UNPKG

30.4 kBMarkdownView Raw
1## 6.0.1 (2022-06-17)
2
3### Bug fixes
4
5Avoid DOM selection corruption when the editor doesn't have focus but has selection and updates its content.
6
7Fall back to dispatching by key code when a key event produces a non-ASCII character (so that Cyrillic and Arabic keyboards can still use bindings specified with Latin characters).
8
9## 6.0.0 (2022-06-08)
10
11### New features
12
13The new static `EditorView.findFromDOM` method can be used to retrieve an editor instance from its DOM structure.
14
15Instead of passing a constructed state to the `EditorView` constructor, it is now also possible to inline the configuration options to the state in the view config object.
16
17## 0.20.7 (2022-05-30)
18
19### Bug fixes
20
21Fix an issue on Chrome Android where the DOM could fail to display the actual document after backspace.
22
23Avoid an issue on Chrome Android where DOM changes were sometimes inappropriately replace by a backspace key effect due to spurious beforeinput events.
24
25Fix a problem where the content element's width didn't cover the width of the actual content.
26
27Work around a bug in Chrome 102 which caused wheel scrolling of the editor to be interrupted every few lines.
28
29## 0.20.6 (2022-05-20)
30
31### Bug fixes
32
33Make sure the editor re-measures itself when its attributes are updated.
34
35## 0.20.5 (2022-05-18)
36
37### Bug fixes
38
39Fix an issue where gutter elements without any markers in them would not get the `cm-gutterElement` class assigned.
40
41Fix an issue where DOM event handlers registered by plugins were retained indefinitely, even after the editor was reconfigured.
42
43## 0.20.4 (2022-05-03)
44
45### Bug fixes
46
47Prevent Mac-style behavior of inserting a period when the user inserts two spaces.
48
49Fix an issue where the editor would sometimes not restore the DOM selection when refocused with a selection identical to the one it held when it lost focus.
50
51## 0.20.3 (2022-04-27)
52
53### Bug fixes
54
55Fix a bug where the input handling could crash on repeated (or held) backspace presses on Chrome Android.
56
57## 0.20.2 (2022-04-22)
58
59### New features
60
61The new `hideOn` option to `hoverTooltip` allows more fine-grained control over when the tooltip should hide.
62
63## 0.20.1 (2022-04-20)
64
65### Bug fixes
66
67Remove debug statements that accidentally made it into 0.20.0.
68
69Fix a regression in `moveVertically`.
70
71## 0.20.0 (2022-04-20)
72
73### Breaking changes
74
75The deprecated interfaces `blockAtHeight`, `visualLineAtHeight`, `viewportLines`, `visualLineAt`, `scrollPosIntoView`, `scrollTo`, and `centerOn` were removed from the library.
76
77All decorations are now provided through `EditorView.decorations`, and are part of a single precedence ordering. Decoration sources that need access to the view are provided as functions.
78
79Atomic ranges are now specified through a facet (`EditorView.atomicRanges`).
80
81Scroll margins are now specified through a facet (`EditorView.scrollMargins`).
82
83Plugin fields no longer exist in the library (and are replaced by facets holding function values).
84
85This package no longer re-exports the Range type from @codemirror/state.
86
87### Bug fixes
88
89Fix a bug where zero-length block widgets could cause `viewportLineBlocks` to contain overlapping ranges.
90
91### New features
92
93The new `perLineTextDirection` facet configures whether the editor reads text direction per line, or uses a single direction for the entire editor. `EditorView.textDirectionAt` returns the direction around a given position.
94
95`rectangularSelection` and `crosshairCursor` from @codemirror/rectangular-selection were merged into this package.
96
97This package now exports the tooltip functionality that used to live in @codemirror/tooltip.
98
99The exports from the old @codemirror/panel package are now available from this package.
100
101The exports from the old @codemirror/gutter package are now available from this package.
102
103## 0.19.48 (2022-03-30)
104
105### Bug fixes
106
107Fix an issue where DOM syncing could crash when a DOM node was moved from a parent to a child node (via widgets reusing existing nodes).
108
109To avoid interfering with things like a vim mode too much, the editor will now only activate the tab-to-move-focus escape hatch after an escape press that wasn't handled by an event handler.
110
111Make sure the view measures itself before the page is printed.
112
113Tweak types of view plugin defining functions to avoid TypeScript errors when the plugin value doesn't have any of the interface's properties.
114
115## 0.19.47 (2022-03-08)
116
117### Bug fixes
118
119Fix an issue where block widgets at the start of the viewport could break height computations.
120
121## 0.19.46 (2022-03-03)
122
123### Bug fixes
124
125Fix a bug where block widgets on the edges of viewports could cause the positioning of content to misalign with the gutter and height computations.
126
127Improve cursor height next to widgets.
128
129Fix a bug where mapping positions to screen coordinates could return incorred coordinates during composition.
130
131## 0.19.45 (2022-02-23)
132
133### Bug fixes
134
135Fix an issue where the library failed to call `WidgetType.destroy` on the old widget when replacing a widget with a different widget of the same type.
136
137Fix an issue where the editor would compute DOM positions inside composition contexts incorrectly in some cases, causing the selection to be put in the wrong place and needlessly interrupting compositions.
138
139Fix leaking of resize event handlers.
140
141## 0.19.44 (2022-02-17)
142
143### Bug fixes
144
145Fix a crash that occasionally occurred when drag-selecting in a way that scrolled the editor.
146
147### New features
148
149The new `EditorView.compositionStarted` property indicates whether a composition is starting.
150
151## 0.19.43 (2022-02-16)
152
153### Bug fixes
154
155Fix several issues where editing or composition went wrong due to our zero-width space kludge characters ending up in unexpected places.
156
157Make sure the editor re-measures its dimensions whenever its theme changes.
158
159Fix an issue where some keys on Android phones could leave the editor DOM unsynced with the actual document.
160
161## 0.19.42 (2022-02-05)
162
163### Bug fixes
164
165Fix a regression in cursor position determination after making an edit next to a widget.
166
167## 0.19.41 (2022-02-04)
168
169### Bug fixes
170
171Fix an issue where the editor's view of its content height could go out of sync with the DOM when a line-wrapping editor had its width changed, causing wrapping to change.
172
173Fix a bug that caused the editor to draw way too much content when scrolling to a position in an editor (much) taller than the window.
174
175Report an error when a replace decoration from a plugin crosses a line break, rather than silently ignoring it.
176
177Fix an issue where reading DOM changes was broken when `lineSeparator` contained more than one character.
178
179Make ordering of replace and mark decorations with the same extent and inclusivness more predictable by giving replace decorations precedence.
180
181Fix a bug where, on Chrome, replacement across line boundaries and next to widgets could cause bogus zero-width characters to appear in the content.
182
183## 0.19.40 (2022-01-19)
184
185### Bug fixes
186
187Make composition input properly appear at secondary cursors (except when those are in the DOM node with the composition, in which case the browser won't allow us to intervene without aborting the composition).
188
189Fix a bug that cause the editor to get confused about which content was visible after scrolling something into view.
190
191Fix a bug where the dummy elements rendered around widgets could end up in a separate set of wrapping marks, and thus become visible.
192
193`EditorView.moveVertically` now preserves the `assoc` property of the input range.
194
195Get rid of gaps between selection elements drawn by `drawSelection`.
196
197Fix an issue where replacing text next to a widget might leak bogus zero-width spaces into the document.
198
199Avoid browser selection mishandling when a focused view has `setState` called by eagerly refocusing it.
200
201## 0.19.39 (2022-01-06)
202
203### Bug fixes
204
205Make sure the editor signals a `geometryChanged` update when its width changes.
206
207### New features
208
209`EditorView.darkTheme` can now be queried to figure out whether the editor is using a dark theme.
210
211## 0.19.38 (2022-01-05)
212
213### Bug fixes
214
215Fix a bug that caused line decorations with a `class` property to suppress all other line decorations for that line.
216
217Fix a bug that caused scroll effects to be corrupted when further updates came in before they were applied.
218
219Fix an issue where, depending on which way a floating point rounding error fell, `posAtCoords` (and thus vertical cursor motion) for positions outside of the vertical range of the document might or might not return the start/end of the document.
220
221## 0.19.37 (2021-12-22)
222
223### Bug fixes
224
225Fix regression where plugin replacing decorations that span to the end of the line are ignored.
226
227## 0.19.36 (2021-12-22)
228
229### Bug fixes
230
231Fix a crash in `posAtCoords` when the position lies in a block widget that is rendered but scrolled out of view.
232
233Adding block decorations from a plugin now raises an error. Replacing decorations that cross lines are ignored, when provided by a plugin.
234
235Fix inverted interpretation of the `precise` argument to `posAtCoords`.
236
237## 0.19.35 (2021-12-20)
238
239### Bug fixes
240
241The editor will now handle double-taps as if they are double-clicks, rather than letting the browser's native behavior happen (because the latter often does the wrong thing).
242
243Fix an issue where backspacing out a selection on Chrome Android would sometimes only delete the last character due to event order issues.
244
245`posAtCoords`, without second argument, will no longer return null for positions below or above the document.
246
247## 0.19.34 (2021-12-17)
248
249### Bug fixes
250
251Fix a bug where content line elements would in some cases lose their `cm-line` class.
252
253## 0.19.33 (2021-12-16)
254
255### Breaking changes
256
257`EditorView.scrollTo` and `EditorView.centerOn` are deprecated in favor of `EditorView.scrollIntoView`, and will be removed in the next breaking release.
258
259### Bug fixes
260
261Fix an issue that could cause the editor to unnecessarily interfere with composition (especially visible on macOS Chrome).
262
263A composition started with multiple lines selected will no longer be interruptd by the editor.
264
265### New features
266
267The new `EditorView.scrollIntoView` function allows you to do more fine-grained scrolling.
268
269## 0.19.32 (2021-12-15)
270
271### Bug fixes
272
273Fix a bug where CodeMirror's own event handers would run even after a user-supplied handler called `preventDefault` on an event.
274
275Properly draw selections when negative text-indent is used for soft wrapping.
276
277Fix an issue where `viewportLineBlocks` could hold inaccurate height information when the vertical scaling changed.
278
279Fixes drop cursor positioning when the document is scrolled. Force a content measure when the editor comes into view
280
281Fix a bug that could cause the editor to not measure its layout the first time it came into view.
282
283## 0.19.31 (2021-12-13)
284
285### New features
286
287The package now exports a `dropCursor` extension that draws a cursor at the current drop position when dragging content over the editor.
288
289## 0.19.30 (2021-12-13)
290
291### Bug fixes
292
293Refine Android key event handling to work properly in a GBoard corner case where pressing Enter fires a bunch of spurious deleteContentBackward events.
294
295Fix a crash in `drawSelection` for some kinds of selections.
296
297Prevent a possibility where some content updates causes duplicate text to remain in DOM.
298
299### New features
300
301Support a `maxLength` option to `MatchDecorator` that allows user code to control how far it scans into hidden parts of viewport lines.
302
303## 0.19.29 (2021-12-09)
304
305### Bug fixes
306
307Fix a bug that could cause out-of-view editors to get a nonsensical viewport and fail to scroll into view when asked to.
308
309Fix a bug where would return 0 when clicking below the content if the last line was replaced with a block widget decoration.
310
311Fix an issue where clicking at the position of the previous cursor in a blurred editor would cause the selection to reset to the start of the document.
312
313Fix an issue where composition could be interrupted if the browser created a new node inside a mark decoration node.
314
315## 0.19.28 (2021-12-08)
316
317### Bug fixes
318
319Fix an issue where pressing Enter on Chrome Android during composition did not fire key handlers for Enter.
320
321Avoid a Chrome bug where the virtual keyboard closes when pressing backspace after a widget.
322
323Fix an issue where the editor could show a horizontal scroll bar even after all lines that caused it had been deleted or changed.
324
325## 0.19.27 (2021-12-06)
326
327### Bug fixes
328
329Fix a bug that could cause `EditorView.plugin` to inappropriately return `null` during plugin initialization.
330
331Fix a bug where a block widget without `estimatedHeight` at the end of the document could fail to be drawn
332
333## 0.19.26 (2021-12-03)
334
335### New features
336
337Widgets can now define a `destroy` method that is called when they are removed from the view.
338
339## 0.19.25 (2021-12-02)
340
341### Bug fixes
342
343Widgets around replaced ranges are now visible when their side does not point towards the replaced range.
344
345A replaced line with a line decoration no longer creates an extra empty line block in the editor.
346
347The `scrollPastEnd` extension will now over-reserve space at the bottom of the editor on startup, to prevent restored scroll positions from being clipped.
348
349### New features
350
351`EditorView.editorAttributes` and `contentAttributes` may now hold functions that produce the attributes.
352
353## 0.19.24 (2021-12-01)
354
355### Bug fixes
356
357Fix a bug where `lineBlockAt`, for queries inside the viewport, would always return the first line in the viewport.
358
359## 0.19.23 (2021-11-30)
360
361### Bug fixes
362
363Fix an issue where after some kinds of changes, `EditorView.viewportLineBlocks` held an out-of-date set of blocks.
364
365### New features
366
367Export `EditorView.documentPadding`, with information about the vertical padding of the document.
368
369## 0.19.22 (2021-11-30)
370
371### Bug fixes
372
373Fix an issue where editors with large vertical padding (for example via `scrollPastEnd`) could sometimes lose their scroll position on Chrome.
374
375Avoid some unnecessary DOM measuring work by more carefully checking whether it is needed.
376
377### New features
378
379The new `elementAtHeight`, `lineBlockAtHeight`, and `lineBlockAt` methods provide a simpler and more efficient replacement for the (now deprecated) `blockAtHeight`, `visualLineAtHeight`, and `visualLineAt` methods.
380
381The editor view now exports a `documentTop` getter that gives you the vertical position of the top of the document. All height info is queried and reported relative to this top.
382
383The editor view's new `viewportLineBlocks` property provides an array of in-viewport line blocks, and replaces the (now deprecated) `viewportLines` method.
384
385## 0.19.21 (2021-11-26)
386
387### Bug fixes
388
389Fix a problem where the DOM update would unnecessarily trigger browser relayouts.
390
391## 0.19.20 (2021-11-19)
392
393### Bug fixes
394
395Run a measure cycle when the editor's size spontaneously changes.
396
397## 0.19.19 (2021-11-17)
398
399### Bug fixes
400
401Fix a bug that caused the precedence of `editorAttributes` and `contentAttributes` to be inverted, making lower-precedence extensions override higher-precedence ones.
402
403## 0.19.18 (2021-11-16)
404
405### Bug fixes
406
407Fix an issue where the editor wasn't aware it was line-wrapping with its own `lineWrapping` extension enabled.
408
409## 0.19.17 (2021-11-16)
410
411### Bug fixes
412
413Avoid an issue where stretches of whitespace on line wrap points could cause the cursor to be placed outside of the content.
414
415## 0.19.16 (2021-11-11)
416
417### Breaking changes
418
419Block replacement decorations now default to inclusive, because non-inclusive block decorations are rarely what you need.
420
421### Bug fixes
422
423Fix an issue that caused block widgets to always have a large side value, making it impossible to show them between to replacement decorations.
424
425Fix a crash that could happen after some types of viewport changes, due to a bug in the block widget view data structure.
426
427## 0.19.15 (2021-11-09)
428
429### Bug fixes
430
431Fix a bug where the editor would think it was invisible when the document body was given screen height and scroll behavior.
432
433Fix selection reading inside a shadow root on iOS.
434
435## 0.19.14 (2021-11-07)
436
437### Bug fixes
438
439Fix an issue where typing into a read-only editor would move the selection.
440
441Fix slowness when backspace is held down on iOS.
442
443## 0.19.13 (2021-11-06)
444
445### Bug fixes
446
447Fix a bug where backspace, enter, and delete would get applied twice on iOS.
448
449## 0.19.12 (2021-11-04)
450
451### Bug fixes
452
453Make sure the workaround for the lost virtual keyboard on Chrome Android also works on slower phones. Slight style change in beforeinput handler
454
455Avoid failure cases in viewport-based rendering of very long lines.
456
457## 0.19.11 (2021-11-03)
458
459### Breaking changes
460
461`EditorView.scrollPosIntoView` has been deprecated. Use the `EditorView.scrollTo` effect instead.
462
463### New features
464
465The new `EditorView.centerOn` effect can be used to scroll a given range to the center of the view.
466
467## 0.19.10 (2021-11-02)
468
469### Bug fixes
470
471Don't crash when `IntersectionObserver` fires its callback without any records. Try to handle some backspace issues on Chrome Android
472
473Using backspace near uneditable widgets on Chrome Android should now be more reliable.
474
475Work around a number of browser bugs by always rendering zero-width spaces around in-content widgets, so that browsers will treat the positions near them as valid cursor positions and not try to run composition across widget boundaries.
476
477Work around bogus composition changes created by Chrome Android after handled backspace presses.
478
479Work around an issue where tapping on an uneditable node in the editor would sometimes fail to show the virtual keyboard on Chrome Android.
480
481Prevent translation services from translating the editor content. Show direction override characters as special chars by default
482
483`specialChars` will now, by default, replace direction override chars, to mitigate https://trojansource.codes/ attacks.
484
485### New features
486
487The editor view will, if `parent` is given but `root` is not, derive the root from the parent element.
488
489Line decorations now accept a `class` property to directly add DOM classes to the line.
490
491## 0.19.9 (2021-10-01)
492
493### Bug fixes
494
495Fix an issue where some kinds of reflows in the surrounding document could move unrendered parts of the editor into view without the editor noticing and updating its viewport.
496
497Fix an occasional crash in the selection drawing extension.
498
499## 0.19.8 (2021-09-26)
500
501### Bug fixes
502
503Fix a bug that could, on DOM changes near block widgets, insert superfluous line breaks.
504
505Make interacting with a destroyed editor view do nothing, rather than crash, to avoid tripping people up with pending timeouts and such.
506
507Make sure `ViewUpdate.viewportChanged` is true whenever `visibleRanges` changes, so that plugins acting only on visible ranges can use it to check when to update.
508
509Fix line-wise cut on empty lines.
510
511## 0.19.7 (2021-09-13)
512
513### Bug fixes
514
515The view is now aware of the new `EditorState.readOnly` property, and suppresses events that modify the document when it is true.
516
517## 0.19.6 (2021-09-10)
518
519### Bug fixes
520
521Remove a `console.log` that slipped into the previous release.
522
523## 0.19.5 (2021-09-09)
524
525### New features
526
527The new `EditorView.scrollTo` effect can be used to scroll a given range into view.
528
529## 0.19.4 (2021-09-01)
530
531### Bug fixes
532
533Fix an issue where lines containing just a widget decoration wrapped in a mark decoration could be displayed with 0 height.
534
535## 0.19.3 (2021-08-25)
536
537### Bug fixes
538
539Fix a view corruption that could happen in situations involving overlapping mark decorations.
540
541## 0.19.2 (2021-08-23)
542
543### New features
544
545The package now exports a `scrollPastEnd` function, which returns an extension that adds space below the document to allow the last line to be scrolled to the top of the editor.
546
547## 0.19.1 (2021-08-11)
548
549### Breaking changes
550
551The view now emits new-style user event annotations for the transactions it generates.
552
553### Bug fixes
554
555Fix a bug where `coordsAtPos` would allow the passed `side` argument to override widget sides, producing incorrect cursor positions.
556
557Fix a bug that could cause content lines to be misaligned in certain situations involving widgets at the end of lines.
558
559Fix an issue where, if the browser decided to modify DOM attributes in the content in response to some editing action, the view failed to reset those again.
560
561## 0.18.19 (2021-07-12)
562
563### Bug fixes
564
565Fix a regression where `EditorView.editable.of(false)` didn't disable editing on Webkit-based browsers.
566
567## 0.18.18 (2021-07-06)
568
569### Bug fixes
570
571Fix a bug that caused `EditorView.moveVertically` to only move by one line, even when given a custom distance, in some cases.
572
573Hide Safari's native bold/italic/underline controls for the content.
574
575Fix a CSS problem that prevented Safari from breaking words longer than the line in line-wrapping mode.
576
577Avoid a problem where composition would be inappropriately abored on Safari.
578
579Fix drag-selection that scrolls the content by dragging past the visible viewport.
580
581### New features
582
583`posAtCoords` now has an imprecise mode where it'll return an approximate position even for parts of the document that aren't currently rendered.
584
585## 0.18.17 (2021-06-14)
586
587### Bug fixes
588
589Make `drawSelection` behave properly when lines are split by block widgets.
590
591Make sure drawn selections that span a single line break don't leave a gap between the lines.
592
593## 0.18.16 (2021-06-03)
594
595### Bug fixes
596
597Fix a crash that could occur when the document changed during mouse selection.
598
599Fix a bug where composition inside styled content would sometimes be inappropriately aborted by editor DOM updates.
600
601### New features
602
603`MouseSelectionStyle.update` may now return true to indicate it should be queried for a new selection after the update.
604
605## 0.18.15 (2021-06-01)
606
607### Bug fixes
608
609Fix a bug that would, in very specific circumstances, cause `posAtCoords` to go into an infinite loop in Safari.
610
611Fix a bug where some types of IME input on Mobile Safari would drop text.
612
613## 0.18.14 (2021-05-28)
614
615### Bug fixes
616
617Fix an issue where the DOM selection was sometimes not properly updated when next to a widget.
618
619Invert the order in which overlapping decorations are drawn so that higher-precedence decorations are nested inside lower-precedence ones (and thus override their styling).
620
621Fix a but in `posAtCoords` where it would in some situations return -1 instead of `null`.
622
623### New features
624
625A new plugin field, `PluginField.atomicRanges`, can be used to cause cursor motion to skip past some ranges of the document.
626
627## 0.18.13 (2021-05-20)
628
629### Bug fixes
630
631Fix a bug that would cause the content DOM update to crash in specific circumstances.
632
633Work around an issue where, after some types of changes, Mobile Safari would ignore Enter presses.
634
635Make iOS enter and backspace handling more robust, so that platform bugs are less likely to break those keys in the editor.
636
637Fix a regression where Esc + Tab no longer allowed the user to exit the editor.
638
639### New features
640
641You can now drop text files into the editor.
642
643## 0.18.12 (2021-05-10)
644
645### Bug fixes
646
647Work around a Mobile Safari bug where, after backspacing out the last character on a line, Enter didn't work anymore.
648
649Work around a problem in Mobile Safari where you couldn't tap to put the cursor at the end of a line that ended in a widget.
650
651## 0.18.11 (2021-04-30)
652
653### Bug fixes
654
655Add an attribute to prevent the Grammarly browser extension from messing with the editor content.
656
657Fix more issues around selection handling a Shadow DOM in Safari.
658
659## 0.18.10 (2021-04-27)
660
661### Bug fixes
662
663Fix a bug where some types of updates wouldn't properly cause marks around the changes to be joined in the DOM.
664
665Fix an issue where the content and gutters in a fixed-height editor could be smaller than the editor height.
666
667Fix a crash on Safari when initializing an editor in an unfocused window.
668
669Fix a bug where the editor would incorrectly conclude it was out of view in some types of absolutely positioned parent elements.
670
671## 0.18.9 (2021-04-23)
672
673### Bug fixes
674
675Fix a crash that occurred when determining DOM coordinates in some specific situations.
676
677Fix a crash when a DOM change that ended at a zero-width view element (widget) removed that element from the DOM.
678
679Disable autocorrect and autocapitalize by default, since in most code-editor contexts they get in the way. You can use `EditorView.contentAttributes` to override this.
680
681Fix a bug that interfered with native touch selection handling on Android.
682
683Fix an unnecessary DOM update after composition that would disrupt touch selection on Android.
684
685Add a workaround for Safari's broken selection reporting when the editor is in a shadow DOM tree.
686
687Fix select-all from the context menu on Safari.
688
689## 0.18.8 (2021-04-19)
690
691### Bug fixes
692
693Handle selection replacements where the inserted text matches the start/end of the replaced text better.
694
695Fix an issue where the editor would miss scroll events when it was placed in a DOM component slot.
696
697## 0.18.7 (2021-04-13)
698
699### Bug fixes
700
701Fix a crash when drag-selecting out of the editor with editable turned off.
702
703Backspace and delete now largely work in an editor without a keymap.
704
705Pressing backspace on iOS should now properly update the virtual keyboard's capitalize and autocorrect state.
706
707Prevent random line-wrapping in (non-wrapping) editors on Mobile Safari.
708## 0.18.6 (2021-04-08)
709
710### Bug fixes
711
712Fix an issue in the compiled output that would break the code when minified with terser.
713
714## 0.18.5 (2021-04-07)
715
716### Bug fixes
717
718Improve handling of bidi text with brackets (conforming to Unicode 13's bidi algorithm).
719
720Fix the position where `drawSelection` displays the cursor on bidi boundaries.
721
722## 0.18.4 (2021-04-07)
723
724### Bug fixes
725
726Fix an issue where the default focus ring gets obscured by the gutters and active line.
727
728Fix an issue where the editor believed Chrome Android didn't support the CSS `tab-size` style.
729
730Don't style active lines when there are non-empty selection ranges, so that the active line background doesn't obscure the selection.
731
732Make iOS autocapitalize update properly when you press Enter.
733
734## 0.18.3 (2021-03-19)
735
736### Breaking changes
737
738The outer DOM element now has class `cm-editor` instead of `cm-wrap` (`cm-wrap` will be present as well until 0.19).
739
740### Bug fixes
741
742Improve behavior of `posAtCoords` when the position is near text but not in any character's actual box.
743
744## 0.18.2 (2021-03-19)
745
746### Bug fixes
747
748Triple-clicking now selects the line break after the clicked line (if any).
749
750Fix an issue where the `drawSelection` plugin would fail to draw the top line of the selection when it started in an empty line.
751
752Fix an issue where, at the end of a specific type of composition on iOS, the editor read the DOM before the browser was done updating it.
753
754## 0.18.1 (2021-03-05)
755
756### Bug fixes
757
758Fix an issue where, on iOS, some types of IME would cause the composed content to be deleted when confirming a composition.
759
760## 0.18.0 (2021-03-03)
761
762### Breaking changes
763
764The `themeClass` function and ``-style selectors in themes are no longer supported (prefixing with `cm-` should be done manually now).
765
766Themes must now use `&` (instead of an extra `$`) to target the editor wrapper element.
767
768The editor no longer adds `cm-light` or `cm-dark` classes. Targeting light or dark configurations in base themes should now be done by using a `&light` or `&dark` top-level selector.
769
770## 0.17.13 (2021-03-03)
771
772### Bug fixes
773
774Work around a Firefox bug where it won't draw the cursor when it is between uneditable elements.
775
776Fix a bug that broke built-in mouse event handling.
777
778## 0.17.12 (2021-03-02)
779
780### Bug fixes
781
782Avoid interfering with touch events, to allow native selection behavior.
783
784Fix a bug that broke sub-selectors with multiple `&` placeholders in themes.
785
786## 0.17.11 (2021-02-25)
787
788### Bug fixes
789
790Fix vertical cursor motion on Safari with a larger line-height.
791
792Fix incorrect selection drawing (with `drawSelection`) when the selection spans to just after a soft wrap point.
793
794Fix an issue where compositions on Safari were inappropriately aborted in some circumstances.
795
796The view will now redraw when the `EditorView.phrases` facet changes, to make sure translated text is properly updated.
797
798## 0.17.10 (2021-02-22)
799
800### Bug fixes
801
802Long words without spaces, when line-wrapping is enabled, are now properly broken.
803
804Fix the horizontal position of selections drawn by `drawSelection` in right-to-left editors with a scrollbar.
805
806## 0.17.9 (2021-02-18)
807
808### Bug fixes
809
810Fix an issue where pasting linewise at the start of a line left the cursor before the inserted content.
811
812## 0.17.8 (2021-02-16)
813
814### Bug fixes
815
816Fix a problem where the DOM selection and the editor state could get out of sync in non-editable mode.
817
818Fix a crash when the editor was hidden on Safari, due to `getClientRects` returning an empty list.
819
820Prevent Firefox from making the scrollable element keyboard-focusable.
821
822## 0.17.7 (2021-01-25)
823
824### New features
825
826Add an `EditorView.announce` state effect that can be used to conveniently provide screen reader announcements.
827
828## 0.17.6 (2021-01-22)
829
830### Bug fixes
831
832Avoid creating very high scroll containers for large documents so that we don't overflow the DOM's fixed-precision numbers.
833
834## 0.17.5 (2021-01-15)
835
836### Bug fixes
837
838Fix a bug that would create space-filling placeholders with incorrect height when document is very large.
839
840## 0.17.4 (2021-01-14)
841
842### Bug fixes
843
844The `drawSelection` extension will now reuse cursor DOM nodes when the number of cursors stays the same, allowing some degree of cursor transition animation.
845
846Makes highlighted special characters styleable (``) and fix their default look in dark themes to have appropriate contrast.
847
848### New features
849
850Adds a new `MatchDecorator` helper class which can be used to easily maintain decorations on content that matches a regular expression.
851
852## 0.17.3 (2021-01-06)
853
854### New features
855
856The package now also exports a CommonJS module.
857
858## 0.17.2 (2021-01-04)
859
860### Bug fixes
861
862Work around Chrome problem where the native shift-enter behavior inserts two line breaks.
863
864Make bracket closing and bracket pair removing more reliable on Android.
865
866Fix bad cursor position and superfluous change transactions after pressing enter when in a composition on Android.
867
868Fix issue where the wrong character was deleted when backspacing out a character before an identical copy of that character on Android.
869
870## 0.17.1 (2020-12-30)
871
872### Bug fixes
873
874Fix a bug that prevented `ViewUpdate.focusChanged` from ever being true.
875
876## 0.17.0 (2020-12-29)
877
878### Breaking changes
879
880First numbered release.
881