Diffdown is a real-time collaborative Markdown editor/previewer built on the AT Protocol
diffdown.com
1## 6.39.16 (2026-03-02)
2
3### Bug fixes
4
5Perform scroll stabilization on the document or wrapping scrollable elements, when the user scrolls the editor.
6
7Fix an issue where changing decorations right before a composition could end up corrupting the visible DOM.
8
9Fix an issue where some types of text input over a selection would be read as happening in wrong position.
10
11## 6.39.15 (2026-02-20)
12
13### Bug fixes
14
15Fix a regression where the editor would forget previously measured line heights without good reason.
16
17Fix an issue where scrolling the cursor into view sometimes wouldn't work on Chrome Android.
18
19Fix a bug that broke composition inside of block wrappers.
20
21## 6.39.14 (2026-02-12)
22
23### Bug fixes
24
25Improve performance of `posAtCoords` on long lines.
26
27Fix a regression where copy and cut in a shadow DOM on Safari would fall back to the native behavior, often copying the wrong text.
28
29## 6.39.13 (2026-02-08)
30
31### Bug fixes
32
33Fix an issue where a widget at start or end of line, when wrapped to cover that whole line, could block vertical cursor motion.
34
35Fix an issue `EditorView.moveVertically` that would sometimes cause selection-extending vertical motion to get stuck on line wrapping points.
36
37## 6.39.12 (2026-01-30)
38
39### Bug fixes
40
41Fix a bug where the visual selection drawn by `drawSelection` could fail to update properly in some circumstances.
42
43Fix a bug where PageUp/PageDown near the edge of the viewport might completely skip to the start/end of the document.
44
45Fix a regression that caused mark decorations to be split on text node chunk boundaries again.
46
47## 6.39.11 (2026-01-14)
48
49### Bug fixes
50
51Avoid handling copy events for parent editors.
52
53## 6.39.10 (2026-01-13)
54
55### Bug fixes
56
57Fix a regression in the way widget are reused when content next to them changes.
58
59Make sure font metrics get recomputed on `fonts.ready` even if the line height doesn't change.
60
61Fix an issue where compositions next to a widget that create a new text node could get needlessly interrupted during an editor update.
62
63## 6.39.9 (2026-01-06)
64
65### Bug fixes
66
67Fix a bug where `EditorSelection.cursor()` with a non-zero `assoc` value would not be visually respected at soft-wrap boundaries on initial view creation.
68
69Fix error caused by hover tooltips running a scheduled timeout after their editor has been destroyed.
70
71Fix a bug that caused `EditorView.outerDecorations` to not affect the content height map.
72
73Fix an issue where composition near a widget could get unnecessarily interrupted.
74
75## 6.39.8 (2025-12-30)
76
77### Bug fixes
78
79Fix a bug that cause `coordsAtPos` to use the dimensions of widget buffers when there were more meaningful elements to use nearby.
80
81Fix a data structure corruption that could cause crashes during viewport changes.
82
83## 6.39.7 (2025-12-24)
84
85### Bug fixes
86
87Fix a bug that could sometimes cause the document to become mangled during composition.
88
89## 6.39.6 (2025-12-23)
90
91### Bug fixes
92
93Fix an issue when composing on the boundary of a decoration, where the text after the composition would get garbled.
94
95## 6.39.5 (2025-12-22)
96
97### Bug fixes
98
99Fix an issue where replaced widgets alone on a line weren't reused and didn't get their `updateDOM` method called.
100
101Fix a bug where, when selecting full lines at the end of the document and inserting a character on Chrome, an inappropriate extra newline was inserted.
102
103## 6.39.4 (2025-12-12)
104
105### Bug fixes
106
107Fix a bug where paste events handlers on Chrome could fail to run when pasting on a blank line.
108
109Fix a regression causing the native cursor to get stuck before block widgets with side>0.
110
111Fix a crash in content DOM building after a block widget.
112
113Fix a bug in `posAtCoords` that would in some circumstances make it return positions on the wrong side of a block widget.
114
115## 6.39.3 (2025-12-11)
116
117### Bug fixes
118
119Fix a bug that could corrupt the rendered document in some situations involving adjacent mark decorations of the same type.
120
121## 6.39.2 (2025-12-09)
122
123### Bug fixes
124
125Fix an issue where `moveVertially` was sometimes unable to escape lines with thick borders or padding.
126
127## 6.39.1 (2025-12-09)
128
129### Bug fixes
130
131Restore a workaround for a Chrome selection bug that had regressed in the previous release.
132
133## 6.39.0 (2025-12-08)
134
135### Bug fixes
136
137Properly handle bidirectional text in `posAtCoords`.
138
139Avoid computing a zero character width (leading to divisions by zero) when the editor is hidden and the browser doesn't have a layout for it.
140
141### New features
142
143The `posAndSideAtCoords` method is an extended version of `posAtCoords` that also tells you which side of the position the coordinates are associated with.
144
145Add support for block wrappers, decoration-like things that allow extension code to create DOM nodes around groups of lines.
146
147## 6.38.8 (2025-11-17)
148
149### Bug fixes
150
151Improve handling of composition with multiple cursors on MacOS.
152
153Fix an issue where computing a document position from screen coordinates would sometimes go wrong in right-to-left text.
154
155## 6.38.7 (2025-11-14)
156
157### Bug fixes
158
159Make detection of transformed tooltip parent elements (forcing absolute positioning) more robust on current browsers.
160
161Avoid an issue where on Chrome and Safari, typing over a cross-line selection can replace widgets on the line after the selection with their plain text content.
162
163Fix a bug that broke insertion of composed input at multiple cursors when the IME keeps the selection at the start of the composed text.
164
165## 6.38.6 (2025-10-13)
166
167### Bug fixes
168
169Work around a regression in Safari 26 that causes fragments of old selections to remain visible.
170
171## 6.38.5 (2025-10-07)
172
173### Bug fixes
174
175Avoid firing text changes that cover unchanged text on Android.
176
177Fix an issue where the editor could, in some circumstances, insert a stray newline when typing over a document that ended in a block widget.
178
179Work around an issue in Safari 26 that causes inappropriate scrolling on focus in some circumstances.
180
181## 6.38.4 (2025-09-28)
182
183### Bug fixes
184
185Work around a Chrome Android issue where the browser doesn't properly fire composition end events, leaving CodeMirror to believe the user was still composing.
186
187## 6.38.3 (2025-09-22)
188
189### Bug fixes
190
191Work around a rendering bug in Mobile Safari by completely hiding empty layers.
192
193Fix vertical cursor motion in Chrome around decorations with bottom borders or margins.
194
195Fix an issue that caused mark decorations longer than 512 characters to needlessly be split.
196
197Move the cursor out of atomic ranges when text input happens.
198
199## 6.38.2 (2025-09-01)
200
201### Bug fixes
202
203Re-enable falling dispatching keys by key code for Cmd-Alt- combinations on macOS.
204
205Make sure all pointer selections skip atomic ranges.
206
207## 6.38.1 (2025-07-15)
208
209### Bug fixes
210
211Make the keymap not dispatch Alt key combos on macOS by key code, because those are generally used to type special characters.
212
213Fix a layout bug that could occur with very narrow editors.
214
215## 6.38.0 (2025-06-27)
216
217### New features
218
219Gutters can now specify that they should be displayed after the content (which would be to the right in a left-to-right layout).
220
221## 6.37.2 (2025-06-12)
222
223### Bug fixes
224
225Fix an issue where moving the cursor vertically from the one-but-last character on a line would sometimes move incorrectly on Safari.
226
227Fix an issue causing coordinates between lines of text to sometimes be inappropriately placed at the end of the line by `posAtCoords`.
228
229## 6.37.1 (2025-05-30)
230
231### Bug fixes
232
233Properly add `crelt` as a dependency.
234
235## 6.37.0 (2025-05-29)
236
237### New features
238
239View plugins can now take an argument, in which case they must be instantiated with their `of` method in order to be added to a configuration.
240
241The new `showDialog` function makes it easy to show a notification or prompt using a CodeMirror panel.
242
243## 6.36.8 (2025-05-12)
244
245### Bug fixes
246
247Make `logException` log errors to the console when `onerror` returns a falsy value.
248
249Fix an issue in `MatchDecorator` causing `updateDeco` to sometimes not do the right thing for deletions.
250
251## 6.36.7 (2025-05-02)
252
253### Bug fixes
254
255Use the `aria-placeholder` attribute to communicate the placeholder text to screen readers.
256
257Fix a crash when `EditorView.composing` or `.compositionStarted` are accessed during view initialization.
258
259## 6.36.6 (2025-04-24)
260
261### Bug fixes
262
263Fix an issue where `drawSelection` would draw selections starting at a block widget not at a line break in an odd way.
264
265Fix an issue where the editor would inappropriately scroll when editing near the bottom of the document with line wrapping enabled, in some cases.
266
267Fix an issue that caused unnecessary transactions on focus change.
268
269## 6.36.5 (2025-03-29)
270
271### Bug fixes
272
273Fix an issue where some browsers wouldn't enable context menu paste when clicking on placeholder text.
274
275Fix an issue where cursor height would unnecessarily be based on a placeholder node's dimensions, and thus be off from the text height.
276
277## 6.36.4 (2025-03-03)
278
279### Bug fixes
280
281Fix an issue where scrolling down to a range higher than the viewport could in some situations fail to scroll to the proper position.
282
283## 6.36.3 (2025-02-18)
284
285### Bug fixes
286
287Make sure event handlers registered with `domEventHandlers` are not called during view updates, to avoid triggering nested update errors.
288
289Don't include the window scrollbars in the space available for displaying tooltips.
290
291Work around an issue with Chrome's `EditContext` that shows up when using autocompletion while composing with Samsung's virtual Android keyboard.
292
293## 6.36.2 (2025-01-09)
294
295### Bug fixes
296
297Fix an issue where some kinds of relayouts could put the editor in a state where it believed it wasn't in window, preventing relayout, though it in fact was.
298
299Make sure macOS double-space-to-period conversions are properly suppressed.
300
301Fix an issue where native selection changes, such as mobile spacebar-drag, weren't being picked up in edit context mode.
302
303## 6.36.1 (2024-12-19)
304
305### Bug fixes
306
307Fix a crash in MatchDecorator when updating matches at the end of the document.
308
309## 6.36.0 (2024-12-17)
310
311### Bug fixes
312
313Make selection rectangles verticaly align precisely, rather than introducing a slight overlap.
314
315Fix an issue in `MatchDecorator` that caused it to fully rebuild its decorations on normal edits.
316
317### New features
318
319View updates now have a `viewportMoved` flag that is only true when a viewport change originated from something other than mapping the viewport over a document change.
320
321## 6.35.3 (2024-12-09)
322
323### Bug fixes
324
325Fix an issue where mark decorations that got merged or split weren't properly redrawn.
326
327Avoid spurious focus events by not updating the DOM selection when the editor is unfocused but focusable.
328
329Disable `writingsuggestions` for the editable element, to opt out of Safari's new intelligence completions (which mess up in the editor).
330
331## 6.35.2 (2024-12-07)
332
333### Bug fixes
334
335Fix an issue on Chrome where typing at the end of the document would insert a character after the cursor.
336
337## 6.35.1 (2024-12-06)
338
339### Bug fixes
340
341Work around another crash caused by incorrect composition positions reported by `EditContext`.
342
343Stop disabling custom cursors on Safari version 11.4 and up, which support `caret-color`.
344
345Fix an issue where a tooltip with wrapped content could, in some circumstances, fail to find a stable position due to a cyclic dependency between its width and its position.
346
347## 6.35.0 (2024-11-21)
348
349### New features
350
351Tooltips can now use the `clip` option to control whether they are hidden when outside the visible editor content.
352
353## 6.34.3 (2024-11-15)
354
355### Bug fixes
356
357Make sure positions covered by a gutter or a panel aren't treated as visible for the purpose of displaying tooltips.
358
359Properly include the tooltip arrow height when checking whether a tooltip fits in its preferred above/below position.
360
361Fix an issue with compositions on Chrome inserting their content in the wrong position when another document change came in during composition.
362
363## 6.34.2 (2024-11-05)
364
365### Bug fixes
366
367Fix the default cursor color for dark themes, which was way too dark.
368
369## 6.34.1 (2024-09-27)
370
371### Bug fixes
372
373Avoid a stack overflow that could happen when updating a line with a lot of text tokens.
374
375Improve the way enormously long (non-wrapped) lines are displayed by making sure they stay shorter than the maximal pixel size the browser's CSS engine can handle.
376
377## 6.34.0 (2024-09-25)
378
379### Bug fixes
380
381Fix an issue where the dots past the wrapping point were displayed incorrectly when using `highlightWhitespace` with a wrapped sequence of spaces.
382
383Improve performance of documents displaying lots of highlighted spaces by using a CSS background instead of pseudo-element.
384
385### New features
386
387`placeholder` now allows a function that constructs the placedholder DOM to be passed in, and uses `cloneNode` when a raw element is passed in, to prevent adding the same element to multiple editors.
388
389## 6.33.1 (2024-08-30)
390
391### Bug fixes
392
393Work around odd behavior in Chrome's newly supported `caretPositionFromPoint` method, which could cause CodeMirror to crash with a null dereference.
394
395## 6.33.0 (2024-08-24)
396
397### Bug fixes
398
399Make it easier to move the pointer over a hover tooltip with an arrow by not closing the tooltip when the pointer is moving over the gap for the arrow.
400
401### New features
402
403The new `EditorView.clipboardInputFilter` and `clipboardOutputFilter` facets allow you to register filter functions that change text taken from or sent to the clipboard.
404
405## 6.32.0 (2024-08-12)
406
407### Bug fixes
408
409Fix a bug where the editor could draw way too big a viewport when not managing its own scrollbar.
410
411### New features
412
413The new `gutterWidgetClass` facet makes it possible to add a class to gutter elements next to widgets.
414
415## 6.31.0 (2024-08-11)
416
417### Bug fixes
418
419Avoid the editor's geometry measurements becoming incorrect when fonts finish loading by scheduling a measure on `document.fonts.ready`.
420
421Avoid an issue where Chrome would incorrectly scroll the window when deleting lines in the editor.
422
423Fix an issue where in some layouts editor content would be drawn on top of panel elements.
424
425Fix an issue where `coordsAtPos` would return null when querying a position in a block widget.
426
427### New features
428
429The new `lineNumberWidgetMarker` facet makes it possible to insert markers into the line number gutter for widgets.
430
431## 6.30.0 (2024-08-05)
432
433### Bug fixes
434
435Make spell check corrections work again on `EditContext`-enabled Chrome versions.
436
437### New features
438
439The value returned by `hoverTooltip` now has an `active` property providing the state field used to store the open tooltips.
440
441## 6.29.1 (2024-07-29)
442
443### Bug fixes
444
445Fix a crash on old Safari browsers that don't support `MediaQueryList.addEventListener`.
446
447Fix an issue where `EditorView.viewportLineBlocks` (and thus other things like the gutter) might be out of date after some kinds of decoration changes.
448
449## 6.29.0 (2024-07-25)
450
451### Bug fixes
452
453Fix an issue that caused typing into an editor marked read-only to cause document changes when using `EditContext`.
454
455Associate a cursor created by clicking above the end of the text on a wrap point with the line before it.
456
457### New features
458
459The package now exports the type of hover tooltip sources as `HoverTooltipSource`.
460
461## 6.28.6 (2024-07-19)
462
463### Bug fixes
464
465Fix an issue where the editor got confused about the position of inserted text when using Chrome's `EditContext` and canceling transactions for typed text.
466
467## 6.28.5 (2024-07-17)
468
469### Bug fixes
470
471Fix a bug that broke drag scrolling along one axis when the innermost scrollable element around the editor was only scrollable along the other axis.
472
473Work around a memory leak in Chrome's EditContext implementation.
474
475## 6.28.4 (2024-07-03)
476
477### Bug fixes
478
479Fix a bug where EditContext-based editing could corrupt the document in some situations.
480
481## 6.28.3 (2024-07-01)
482
483### Bug fixes
484
485Fix an issue causing the IME interface to appear in the wrong spot on Chrome Windows.
486
487## 6.28.2 (2024-06-21)
488
489### Bug fixes
490
491Only use `EditContext` on Chrome versions that support passing it an inverted selection range.
492
493Fix an issue that prevented non-inclusive block widgets from having their `updateDOM` method called when changed.
494
495Re-enable `EditContext` use on Chrome 126 and up.
496
497## 6.28.1 (2024-06-12)
498
499### Bug fixes
500
501Disable `EditContext` by default again, to work around a regression where Chrome's implementation doesn't support inverted selections.
502
503Make sure `EditorView.editable` is respected when `EditContext` is used.
504
505## 6.28.0 (2024-06-10)
506
507### Bug fixes
508
509Fix an issue where long lines broken up by block widgets were sometimes only partially rendered.
510
511### New features
512
513The editor will now, when available (which is only on Chrome for the foreseeable future) use the [`EditContext`](https://developer.mozilla.org/en-US/docs/Web/API/EditContext) API to capture text input.
514
515## 6.27.0 (2024-06-04)
516
517### New features
518
519The new `setTabFocusMode` method can be used to control whether the editor disables key bindings for Tab and Shift-Tab.
520
521## 6.26.4 (2024-06-04)
522
523### Bug fixes
524
525Fix an issue where commands with an optional second argument would get the keyboard event in that argument when called from a keymap.
526
527Fix an issue that could cause the cursor to be rendered on the wrong side of a zero-length block widget.
528
529Fix an issue where `drawSelection` got confused by block widgets in line-wrapped editors in some situations.
530
531Don't hide the native selection in widgets that have focus.
532
533Make sure that clicking an unfocusable editor still remove focus from any other focused elements.
534
535Fix a crash when loading the package in a non-browser environment.
536
537Stop mouse selection when the user types.
538
539## 6.26.3 (2024-04-12)
540
541### Bug fixes
542
543Fix an issue where dispatching an update to an editor before it measured itself for the first time could cause the scroll position to incorrectly move.
544
545Fix a crash when multiple tooltips with arrows are shown.
546
547## 6.26.2 (2024-04-09)
548
549### Bug fixes
550
551Improve behavior of `scrollPastEnd` in a scaled editor.
552
553When available, use `Selection.getComposedRanges` on Safari to find the selection inside a shadow DOM.
554
555Remove the workaround that avoided inappropriate styling on composed text after a decoration again, since it breaks the stock Android virtual keyboard.
556
557## 6.26.1 (2024-03-28)
558
559### Bug fixes
560
561Fix the editor getting stuck in composition when Safari fails to fire a compositionend event for a dead key composition.
562
563Fix an issue where, with IME systems that kept the cursor at the start of the composed text, the editor misidentified the target node and disrupted composition.
564
565Fix a bug where in a line-wrapped editor, with some content, the initial scroll position would be off from the top of the document.
566
567## 6.26.0 (2024-03-14)
568
569### Bug fixes
570
571Avoid the editor getting confused when iOS autocorrects on pressing Enter and does the correction and the break insertion in two different events.
572
573Fix the pasting of copied URIs in iOS.
574
575Fix a bug where a scaled editor could keep performing unnecessary updates due to tiny differences in geometry values returned by the browser.
576
577Fix a bug where, on iOS with a physical keyboard, the modifiers for some keys weren't being passed to the keymaps.
578
579Work around the fact that Mobile Safari makes DOM changes before firing a key event when typing ctrl-d on an external keyboard.
580
581Fix an issue where some commands didn't properly scroll the cursor into view on Mobile Safari.
582
583Re-measure the document when print settings are changed on Chrome.
584
585### New features
586
587The `EditorView.scrollHandler` facet can be used to override or extend the behavior of the editor when things are scrolled into view.
588
589## 6.25.1 (2024-03-06)
590
591### Bug fixes
592
593Fix accidental non-optional field in layer config objects.
594
595## 6.25.0 (2024-03-04)
596
597### Bug fixes
598
599Properly recognize Android GBoard enter presses that strip a space at the end of the line as enter.
600
601Fix a bug that caused the gutter to have the wrong height when the editor was scaled after construction.
602
603When starting a composition after a non-inclusive mark decoration, temporarily insert a widget that prevents the composed text from inheriting that mark's styles.
604
605Make sure the selection is repositioned when a transaction changes decorations without changing the document.
606
607### New features
608
609View plugins can now provide a `docViewUpdate` method that is called whenever the document view is updated.
610
611Layers now take a `updateOnDocUpdate` option that controls whether they are automatically updated when the document view changes.
612
613## 6.24.1 (2024-02-19)
614
615### Bug fixes
616
617Fix a crash that happens when hover tooltips are active during changes, introduced in 6.24.0.
618
619## 6.24.0 (2024-02-09)
620
621### Bug fixes
622
623Fix an issue that broke context-menu select-all on Chrome when the viewport didn't cover the whole document.
624
625Make sure tooltips are ordered by extension precedence in the DOM.
626
627### New features
628
629Hover tooltip sources may now return multiple tooltips.
630
631## 6.23.1 (2024-01-24)
632
633### Bug fixes
634
635Fix a bug that caused `Tooltip.above` to not take effect for tooltips that were already present when the tooltip plugin is initialized.
636
637Automatically reposition tooltips when their size changes.
638
639## 6.23.0 (2023-12-28)
640
641### Bug fixes
642
643Work around odd iOS Safari behavior when doing select all.
644
645Fix a composition interruption when an widget is inserted next to the cursor.
646
647Fix a crash in bidirectional cursor motion.
648
649Simplify visual motion through bidirectional text, fix several corner cases where it would work badly.
650
651Fix a bug that broke some bidi isolates not on the first line of the document.
652
653### New features
654
655`EditorView.bidiIsolatedRanges` now supports automatically determining the direction of the range if not provided by the decoration.
656
657`EditorView.visualLineSide` can be used to find the visual end or start of a line with bidirectional text.
658
659The new `EditorView.outerDecorations` facet can be used to provide decorations that should always be at the bottom of the precedence stack.
660
661## 6.22.3 (2023-12-13)
662
663### Bug fixes
664
665Fix a bug that could cause tooltips to be unnecessarily be positioned absolutely.
666
667Make sure that, when an editor creates tooltips immediately on initialization, the editor is attached to the document when their `mount` callback is called.
668
669## 6.22.2 (2023-12-08)
670
671### Bug fixes
672
673Fix an issue in the bidirectional motion that could cause the cursor to get stuck in a loop when a zero-width non-joiner char was placed on a direction boundary.
674
675Fix a bug that corrupts the editor's internal view tree data structure on some types of edits, putting the editor in a broken state.
676
677## 6.22.1 (2023-11-27)
678
679### Bug fixes
680
681Call widget `destroy` methods when the entire editor is destroyed or reset.
682
683Work around an issue on Safari on macOS Sonoma that made the native cursor visible even when `drawSelection` is enabled.
684
685Fix an issue where, on some browsers, the screenreader announced text ended up in the printed document.
686
687Fix a bug where a hover tooltip could stick around even though the pointer was no longer on the editor when it was moved out over the tooltip.
688
689Fix an issue where hover tooltips could close when moving the mouse onto them due to mouse position rounding issues.
690
691## 6.22.0 (2023-11-03)
692
693### Bug fixes
694
695Exceptions raised by update listeners are now routed to the configured exception sink, if any.
696
697Fix an issue where passing large scroll margins to `scrollIntoView` would cause the measure loop to fail to terminate.
698
699Widgets that are draggable (and allow drag events through in their `ignoreEvent` implementation) can now use the editor's built-in drag/drop behavior.
700
701### New features
702
703The new `scrollTo` option to `EditorView` allows an initial scroll position to be provided.
704
705The new `EditorView.scrollSnapshot` method returns an effect that can be used to reset to a previous scroll position.
706
707## 6.21.4 (2023-10-24)
708
709### Bug fixes
710
711Support the `offset`, `getCoords`, `overlap`, and `resize` properties on hover tooltips, as long as they aren't given conflicting values when there are multiple active hover tooltips.
712
713Fix a bug that caused tooltips in the default configuration to be positioned incorrectly on Chrome when the editor was transformed.
714
715## 6.21.3 (2023-10-06)
716
717### Bug fixes
718
719Fix an issue that caused `coordsForChar` to return the wrong rectangle for characters after a line wrap in Safari.
720
721Make the context menu work when clicking below the content in a fixed-height editor.
722
723Tooltips that have been put below/above their target position because there is no room on their default side now stay there on further updates.
724
725## 6.21.2 (2023-10-02)
726
727### Bug fixes
728
729Fix a regression that broke dragging text from inside the editor.
730
731## 6.21.1 (2023-10-02)
732
733### Bug fixes
734
735Fix a bug that could corrupt the DOM view for specific changes involving newlines and mark decorations.
736
737## 6.21.0 (2023-09-29)
738
739### Bug fixes
740
741Fix a bug that could cause zero-length widgets at the start of a line to be left in the view even after they were removed.
742
743### New features
744
745`RectangleMarker`'s dimension properties are now public.
746
747## 6.20.2 (2023-09-25)
748
749### Bug fixes
750
751Fix an issue in the way the DOM selection is being read that could break backspacing of widgets on Android.
752
753Fix a bug where the editor could incorrectly computate its transform scale when it was small.
754
755## 6.20.1 (2023-09-22)
756
757### Bug fixes
758
759Fix a crash in plugin event handlers after dynamic reconfiguration.
760
761Fix an issue where, on Chrome, tooltips would no longer use fixed positioning.
762
763## 6.20.0 (2023-09-20)
764
765### Bug fixes
766
767Fix an issue that caused `repositionTooltips` to crash when it was called on an editor without tooltips.
768
769Fix an issue that caused the tooltip system to leave empty nodes in the DOM when an editor using the `parent` option to `tooltips` is destroyed.
770
771Fix a bug that regression mouse interaction with the area of a fixed-size editor that isn't covered by the content.
772
773Fix some issues with the way `moveVertically` behaved for positions on line wrap points.
774
775Fix a bug that could cause the document DOM to be incorrectly updated on some types of viewport changes.
776
777### New features
778
779The new `getDrawSelectionConfig` function returns the `drawSelection` configuration for a given state.
780
781## 6.19.0 (2023-09-14)
782
783### Bug fixes
784
785Make sure the drop cursor is properly cleaned up even when another extension handles the drop event.
786
787Fix a crash related to non-inclusive replacing block decorations.
788
789### New features
790
791The new `EditorView.domEventObservers` (and the corresponding option to view plugins) allows you to register functions that are always called for an event, regardless of whether other handlers handled it.
792
793## 6.18.1 (2023-09-11)
794
795### Bug fixes
796
797Fix an issue where the editor duplicated text when the browser moved content into the focused text node on composition.
798
799Make sure `widgetMarker` is called for gutters on lines covered by a block replace decoration.
800
801Fix an issue where the cursor could be shown in a position that doesn't allow a cursor when the selection is in a block widget.
802
803## 6.18.0 (2023-09-05)
804
805### New features
806
807The new `EditorView.scaleX` and `scaleY` properties return the CSS-transformed scale of the editor (or 1 when not scaled).
808
809The editor now supports being scaled with CSS.
810
811## 6.17.1 (2023-08-31)
812
813### Bug fixes
814
815Don't close the hover tooltip when the pointer moves over empty space caused by line breaks within the hovered range.
816
817Fix a bug where on Chrome Android, if a virtual keyboard was slow to apply a change, the editor could end up dropping it.
818
819Work around an issue where line-wise copy/cut didn't work in Firefox because the browser wasn't firing those events when nothing was selected.
820
821Fix a crash triggered by the way some Android IME systems update the DOM.
822
823Fix a bug that caused replacing a word by an emoji on Chrome Android to be treated as a backspace press.
824
825## 6.17.0 (2023-08-28)
826
827### Bug fixes
828
829Fix a bug that broke hover tooltips when hovering over a widget.
830
831### New features
832
833The new `EditorView.cspNonce` facet can be used to provide a Content Security Policy nonce for the library's generated CSS.
834
835The new `EditorView.bidiIsolatedRanges` can be used to inform the editor about ranges styled as Unicode bidirection isolates, so that it can compute the character order correctly.
836
837`EditorView.dispatch` now also accepts an array of transactions to be applied together in a single view update.
838
839The new `dispatchTransactions` option to `new EditorView` now replaces the old (deprecated but still supported) `dispatch` option in a way that allows multiple transactions to be applied in one update.
840
841Input handlers are now passed an additional argument that they can use to retrieve the default transaction that would be applied for the insertion.
842
843## 6.16.0 (2023-07-31)
844
845### Bug fixes
846
847Fix an issue that made the gutter not stick in place when the editor was in a right-to-left context.
848
849### New features
850
851The new `EditorView.coordsForChar` method returns the client rectangle for a given character in the editor.
852
853## 6.15.3 (2023-07-18)
854
855### Bug fixes
856
857Fix another crash regression for compositions before line breaks.
858
859## 6.15.2 (2023-07-18)
860
861### Bug fixes
862
863Fix the check that made sure compositions are dropped when the selection is moved.
864
865## 6.15.1 (2023-07-18)
866
867### Bug fixes
868
869Fix a regression that could cause the composition content to be drawn incorrectly.
870
871## 6.15.0 (2023-07-17)
872
873### Bug fixes
874
875Fix dragging a selection from inside the current selection on macOS.
876
877Fix an issue that could cause the scroll position to jump wildly
878
879Don't try to scroll fixed-positioned elements into view by scrolling their parent elements.
880
881Fix a bug that caused the cursor to be hidden when showing a placeholder that consisted of the empty string.
882
883Resolve some issues where composition could incorrectly affect nearby replaced content.
884
885### New features
886
887Key bindings can now set a `stopPropagation` field to cause the view to stop the key event propagation when it considers the event handled.
888
889## 6.14.1 (2023-07-06)
890
891### Bug fixes
892
893Fix an issue where scrolling up through line-wrapped text would sometimes cause the scroll position to pop down.
894
895Fix an issue where clicking wouldn't focus the editor on Firefox when it was in an iframe and already the active element of the frame.
896
897Fix a bug that could cause compositions to be disrupted because their surrounding DOM was repurposed for some other piece of content.
898
899Fix a bug where adding content to the editor could inappropriately move the scroll position.
900
901Extend detection of Enter presses on Android to `beforeInput` events with an `"insertLineBreak"` type.
902
903## 6.14.0 (2023-06-23)
904
905### Bug fixes
906
907When dragging text inside the editor, look at the state of Ctrl (or Alt on macOS) at the time of the drop, not the start of drag, to determine whether to move or copy the text.
908
909Fix an issue where having a bunch of padding on lines could cause vertical cursor motion and `posAtCoords` to jump over lines.
910
911### New features
912
913Block widget decorations can now be given an `inlineOrder` option to make them appear in the same ordering as surrounding inline widgets.
914
915## 6.13.2 (2023-06-13)
916
917### Bug fixes
918
919Fix an issue in scroll position stabilization for changes above the visible, where Chrome already does this natively and we ended up compensating twice.
920
921## 6.13.1 (2023-06-12)
922
923### Bug fixes
924
925Fix a bug where the cursor would in some circumstances be drawn on the wrong side of an inline widget.
926
927Fix an issue where `scrollPastEnd` could cause the scroll position of editors that weren't in view to be changed unnecessarily.
928
929## 6.13.0 (2023-06-05)
930
931### Bug fixes
932
933Forbid widget decoration side values bigger than 10000, to prevent them from breaking range ordering invariants.
934
935Fix a bug where differences between widgets' estimated and actual heights could cause the editor to inappropriately move the scroll position.
936
937Avoid another situation in which composition that inserts line breaks could corrupt the editor DOM.
938
939### New features
940
941Inline widgets may now introduce line breaks, if they report this through the `WidgetType.lineBreaks` property.
942
943## 6.12.0 (2023-05-18)
944
945### Bug fixes
946
947Remove an accidentally included `console.log`.
948
949### New features
950
951`EditorViewConfig.dispatch` is now passed the view object as a second argument.
952
953## 6.11.3 (2023-05-17)
954
955### Bug fixes
956
957Make sure pointer selection respects `EditorView.atomicRanges`.
958
959Preserve DOM widgets when their decoration type changes but they otherwise stay in the same place.
960
961Fix a bug in `drawSelection` that could lead to invisible or incorrect selections for a blank line below a block widget.
962
963## 6.11.2 (2023-05-13)
964
965### Bug fixes
966
967Fix a bug where the `crosshairCursor` extension could, when non-native key events were fired, trigger disruptive and needless view updates.
968
969Fix an Android issue where backspacing at the front of a line with widget decorations could replace those decorations with their text content.
970
971Respect scroll margins when scrolling the target of drag-selection into view.
972
973Validate selection offsets reported by the browser, to work around Safari giving us invalid values in some cases.
974
975## 6.11.1 (2023-05-09)
976
977### Bug fixes
978
979Don't preserve the DOM around a composition that spans multiple lines.
980## 6.11.0 (2023-05-03)
981
982### New features
983
984Gutters now support a `widgetMarker` option that can be used to add markers next to block widgets.
985
986## 6.10.1 (2023-05-01)
987
988### Bug fixes
989
990Limit cursor height in front of custom placeholder DOM elements.
991
992## 6.10.0 (2023-04-25)
993
994### Bug fixes
995
996Fix a crash in `drawSelection` when a measured position falls on a position that doesn't have corresponding screen coordinates.
997
998Work around unhelpful interaction observer behavior that could cause the editor to not notice it was visible.
999
1000Give the cursor next to a line-wrapped placeholder a single-line height.
1001
1002Make sure drop events below the editable element in a fixed-height editor get handled properly.
1003
1004### New features
1005
1006Widget decorations can now define custom `coordsAtPos` methods to control the way the editor computes screen positions at or in the widget.
1007
1008## 6.9.6 (2023-04-21)
1009
1010### Bug fixes
1011
1012Fix an issue where, when escape was pressed followed by a key that the editor handled, followed by tab, the tab would still move focus.
1013
1014Fix an issue where, in some circumstances, the editor would ignore text changes at the end of a composition.
1015
1016Allow inline widgets to be updated to a different length via `updateDOM`.
1017
1018## 6.9.5 (2023-04-17)
1019
1020### Bug fixes
1021
1022Avoid disrupting the composition in specific cases where Safari invasively changes the DOM structure in the middle of a composition.
1023
1024Fix a bug that prevented `destroy` being called on hover tooltips.
1025
1026Fix a bug where the editor could take focus when content changes required it to restore the DOM selection.
1027
1028Fix height layout corruption caused by a division by zero.
1029
1030Make sure styles targeting the editor's focus status are specific enough to not cause them to apply to editors nested inside another focused editor. This will require themes to adjust their selection background styles to match the new specificity.
1031
1032## 6.9.4 (2023-04-11)
1033
1034### Bug fixes
1035
1036Make the editor scroll while dragging a selection near its sides, even if the cursor isn't outside the scrollable element.
1037
1038Fix a bug that interrupted composition after widgets in some circumstances on Firefox.
1039
1040Make sure the last change in a composition has its user event set to `input.type.compose`, even if the `compositionend` event fires before the changes are applied.
1041
1042Make it possible to remove additional selection ranges by clicking on them with ctrl/cmd held, even if they aren't cursors.
1043
1044Keep widget buffers between widgets and compositions, since removing them confuses IME on macOS Firefox.
1045
1046Fix a bug where, for DOM changes that put the selection in the middle of the changed range, the editor incorrectly set its selection state.
1047
1048Fix a bug where `coordsAtPos` could return a coordinates before the line break when querying a line-wrapped position with a positive `side`.
1049
1050## 6.9.3 (2023-03-21)
1051
1052### Bug fixes
1053
1054Work around a Firefox issue that caused `coordsAtPos` to return rectangles with the full line height on empty lines.
1055
1056Opening a context menu by clicking below the content element but inside the editor now properly shows the browser's menu for editable elements.
1057
1058Fix an issue that broke composition (especially of Chinese IME) after widget decorations.
1059
1060Fix an issue that would cause the cursor to jump around during compositions inside nested mark decorations.
1061
1062## 6.9.2 (2023-03-08)
1063
1064### Bug fixes
1065
1066Work around a Firefox CSS bug that caused cursors to stop blinking in a scrolled editor.
1067
1068Fix an issue in `drawSelection` where the selection extended into the editor's padding.
1069
1070Fix pasting of links copied from iOS share sheet.
1071
1072## 6.9.1 (2023-02-17)
1073
1074### Bug fixes
1075
1076Improve the way `posAtCoords` picks the side of a widget to return by comparing the coordinates the center of the widget.
1077
1078Fix an issue where transactions created for the `focusChangeEffect` facet were sometimes not dispatched.
1079
1080## 6.9.0 (2023-02-15)
1081
1082### Bug fixes
1083
1084Fix an issue where inaccurate estimated vertical positions could cause the viewport to not converge in line-wrapped editors.
1085
1086Don't suppress double-space to period conversion when autocorrect is enabled.
1087
1088Make sure the measuring code notices when the scaling of the editor is changed, and does a full measure in that case.
1089
1090### New features
1091
1092The new `EditorView.focusChangeEffect` facet can be used to dispatch a state effect when the editor is focused or blurred.
1093
1094## 6.8.1 (2023-02-08)
1095
1096### Bug fixes
1097
1098Fix an issue where tooltips that have their height reduced have their height flicker when scrolling or otherwise interacting with the editor.
1099
1100## 6.8.0 (2023-02-07)
1101
1102### Bug fixes
1103
1104Fix a regression that caused clicking on the scrollbar to move the selection.
1105
1106Fix an issue where focus or blur event handlers that dispatched editor transactions could corrupt the mouse selection state.
1107
1108Fix a CSS regression that prevented the drop cursor from being positioned properly.
1109
1110### New features
1111
1112`WidgetType.updateDOM` is now passed the editor view object.
1113
1114## 6.7.3 (2023-01-12)
1115
1116### Bug fixes
1117
1118Fix a bug in `posAtCoords` that could cause incorrect results for positions to the left of a wrapped line.
1119
1120## 6.7.2 (2023-01-04)
1121
1122### Bug fixes
1123
1124Fix a regression where the cursor didn't restart its blink cycle when moving it with the pointer.
1125
1126Even without a `key` property, measure request objects that are already scheduled will not be scheduled again by `requestMeasure`.
1127
1128Fix an issue where keymaps incorrectly interpreted key events that used Ctrl+Alt modifiers to simulate AltGr on Windows.
1129
1130Fix a bug where line decorations with a different `class` property would be treated as equal.
1131
1132Fix a bug that caused `drawSelection` to not notice when it was reconfigured.
1133
1134Fix a crash in the gutter extension caused by sharing of mutable arrays.
1135
1136Fix a regression that caused touch selection on mobile platforms to not work in an uneditable editor.
1137
1138Fix a bug where DOM events on the boundary between lines could get assigned to the wrong line.
1139
1140## 6.7.1 (2022-12-12)
1141
1142### Bug fixes
1143
1144Make the editor properly scroll when moving the pointer out of it during drag selection.
1145
1146Fix a regression where clicking below the content element in an editor with its own height didn't focus the editor.
1147
1148## 6.7.0 (2022-12-07)
1149
1150### Bug fixes
1151
1152Make the editor notice widget height changes to automatically adjust its height information.
1153
1154Fix an issue where widget buffers could be incorrectly omitted after empty lines.
1155
1156Fix an issue in content redrawing that could cause `coordsAtPos` to return incorrect results.
1157
1158### New features
1159
1160The static `RectangleMarker.forRange` method exposes the logic used by the editor to draw rectangles covering a selection range.
1161
1162Layers can now provide a `destroy` function to be called when the layer is removed.
1163
1164The new `highlightWhitespace` extension makes spaces and tabs in the editor visible.
1165
1166The `highlightTrailingWhitespace` extension can be used to make trailing whitespace stand out.
1167
1168## 6.6.0 (2022-11-24)
1169
1170### New features
1171
1172The `layer` function can now be used to define extensions that draw DOM elements over or below the document text.
1173
1174Tooltips that are bigger than the available vertical space for them will now have their height set so that they don't stick out of the window. The new `resize` property on `TooltipView` can be used to opt out of this behavior.
1175
1176## 6.5.1 (2022-11-15)
1177
1178### Bug fixes
1179
1180Fix a bug that caused marked unnecessary splitting of mark decoration DOM elements in some cases.
1181
1182## 6.5.0 (2022-11-14)
1183
1184### Bug fixes
1185
1186Fix an issue where key bindings were activated for the wrong key in some situations with non-US keyboards.
1187
1188### New features
1189
1190A tooltip's `positioned` callback is now passed the available space for tooltips.
1191
1192## 6.4.2 (2022-11-10)
1193
1194### Bug fixes
1195
1196Typing into a read-only editor no longer moves the cursor.
1197
1198Fix an issue where hover tooltips were closed when the mouse was moved over them if they had a custom parent element.
1199
1200Fix an issue where the editor could end up displaying incorrect height measurements (typically after initializing).
1201
1202## 6.4.1 (2022-11-07)
1203
1204### Bug fixes
1205
1206Fix an issue where coordinates next to replaced widgets were returned incorrectly, causing the cursor to be drawn in the wrong place.
1207
1208Update the `crosshairCursor` state on every mousemove event.
1209
1210Avoid an issue in the way that the editor enforces cursor associativity that could cause the cursor to get stuck on single-character wrapped lines.
1211
1212## 6.4.0 (2022-10-18)
1213
1214### Bug fixes
1215
1216Avoid an issue where `scrollPastEnd` makes a single-line editor have a vertical scrollbar.
1217
1218Work around a Chrome bug where it inserts a newline when you press space at the start of a wrapped line.
1219
1220Align `rectangularSelection`'s behavior with other popular editors by making it create cursors at the end of lines that are too short to touch the rectangle.
1221
1222Fix an issue where coordinates on mark decoration boundaries were sometimes taken from the wrong side of the position.
1223
1224Prevent scrolling artifacts caused by attempts to scroll stuff into view when the editor isn't being displayed.
1225
1226### New features
1227
1228`TooltipView` objects can now provide a `destroy` method to be called when the tooltip is removed.
1229
1230## 6.3.1 (2022-10-10)
1231
1232### Bug fixes
1233
1234Fix a crash when trying to scroll something into view in an editor that wasn't in the visible DOM.
1235
1236Fix an issue where `coordsAtPos` returned the coordinates on the wrong side of a widget decoration wrapped in a mark decoration.
1237
1238Fix an issue where content on long wrapped lines could fail to properly scroll into view.
1239
1240Fix an issue where DOM change reading on Chrome Android could get confused when a transaction came in right after a beforeinput event for backspace, enter, or delete.
1241
1242## 6.3.0 (2022-09-28)
1243
1244### Bug fixes
1245
1246Reduce the amount of wrap-point jittering when scrolling through a very long wrapped line.
1247
1248Fix an issue where scrolling to content that wasn't currently drawn due to being on a very long line would often fail to scroll to the right position.
1249
1250Suppress double-space-adds-period behavior on Chrome Mac when it behaves weirdly next to widget.
1251
1252### New features
1253
1254Key binding objects with an `any` property will now add handlers that are called for any key, within the ordering of the keybindings.
1255
1256## 6.2.5 (2022-09-24)
1257
1258### Bug fixes
1259
1260Don't override double/triple tap behavior on touch screen devices, so that the mobile selection menu pops up properly.
1261
1262Fix an issue where updating the selection could crash on Safari when the editor was hidden.
1263
1264## 6.2.4 (2022-09-16)
1265
1266### Bug fixes
1267
1268Highlight the active line even when there is a selection. Prevent the active line background from obscuring the selection backdrop.
1269
1270Fix an issue where elements with negative margins would confuse the editor's scrolling-into-view logic.
1271
1272Fix scrolling to a specific position in an editor that has not been in view yet.
1273
1274## 6.2.3 (2022-09-08)
1275
1276### Bug fixes
1277
1278Fix a bug where cursor motion, when starting from a non-empty selection range, could get stuck on atomic ranges in some circumstances.
1279
1280Avoid triggering Chrome Android's text-duplication issue when a period is typed in the middle of a word.
1281
1282## 6.2.2 (2022-08-31)
1283
1284### Bug fixes
1285
1286Don't reset the selection for selection change events that were suppressed by a node view.
1287
1288## 6.2.1 (2022-08-25)
1289
1290### Bug fixes
1291
1292Don't use the global `document` variable to track focus, since that doesn't work in another window/frame.
1293
1294Fix an issue where key handlers that didn't return true were sometimes called twice for the same keypress.
1295
1296Avoid editing glitches when using deletion keys like ctrl-d on iOS.
1297
1298Properly treat characters from the 'Arabic Presentation Forms-A' Unicode block as right-to-left.
1299
1300Work around a Firefox bug that inserts text at the wrong point for specific cross-line selections.
1301
1302## 6.2.0 (2022-08-05)
1303
1304### Bug fixes
1305
1306Fix a bug where `posAtCoords` would return the wrong results for positions to the right of wrapped lines.
1307
1308### New features
1309
1310The new `EditorView.setRoot` method can be used when an editor view is moved to a new document or shadow root.
1311
1312## 6.1.4 (2022-08-04)
1313
1314### Bug fixes
1315
1316Make selection-restoration on focus more reliable.
1317
1318## 6.1.3 (2022-08-03)
1319
1320### Bug fixes
1321
1322Fix a bug where a document that contains only non-printing characters would lead to bogus text measurements (and, from those, to crashing).
1323
1324Make sure differences between estimated and actual block heights don't cause visible scroll glitches.
1325
1326## 6.1.2 (2022-07-27)
1327
1328### Bug fixes
1329
1330Fix an issue where double tapping enter to confirm IME input and insert a newline on iOS would sometimes insert two newlines.
1331
1332Fix an issue on iOS where a composition could get aborted if the editor scrolled on backspace.
1333
1334## 6.1.1 (2022-07-25)
1335
1336### Bug fixes
1337
1338Make `highlightSpecialChars` replace directional isolate characters by default.
1339
1340The editor will now try to suppress browsers' native behavior of resetting the selection in the editable content when the editable element is focused (programmatically, with tab, etc).
1341
1342Fix a CSS issue that made it possible, when the gutters were wide enough, for them to overlap with the content.
1343
1344## 6.1.0 (2022-07-19)
1345
1346### New features
1347
1348`MatchDecorator` now supports a `decorate` option that can be used to customize the way decorations are added for each match.
1349
1350## 6.0.3 (2022-07-08)
1351
1352### Bug fixes
1353
1354Fix a problem where `posAtCoords` could incorrectly return the start of the next line when querying positions between lines.
1355
1356Fix an issue where registering a high-precedence keymap made keymap handling take precedence over other keydown event handlers.
1357
1358Ctrl/Cmd-clicking can now remove ranges from a multi-range selection.
1359
1360## 6.0.2 (2022-06-23)
1361
1362### Bug fixes
1363
1364Fix a CSS issue that broke horizontal scroll width stabilization.
1365
1366Fix a bug where `defaultLineHeight` could get an incorrect value in very narrow editors.
1367
1368## 6.0.1 (2022-06-17)
1369
1370### Bug fixes
1371
1372Avoid DOM selection corruption when the editor doesn't have focus but has selection and updates its content.
1373
1374Fall 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).
1375
1376## 6.0.0 (2022-06-08)
1377
1378### New features
1379
1380The new static `EditorView.findFromDOM` method can be used to retrieve an editor instance from its DOM structure.
1381
1382Instead 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.
1383
1384## 0.20.7 (2022-05-30)
1385
1386### Bug fixes
1387
1388Fix an issue on Chrome Android where the DOM could fail to display the actual document after backspace.
1389
1390Avoid an issue on Chrome Android where DOM changes were sometimes inappropriately replace by a backspace key effect due to spurious beforeinput events.
1391
1392Fix a problem where the content element's width didn't cover the width of the actual content.
1393
1394Work around a bug in Chrome 102 which caused wheel scrolling of the editor to be interrupted every few lines.
1395
1396## 0.20.6 (2022-05-20)
1397
1398### Bug fixes
1399
1400Make sure the editor re-measures itself when its attributes are updated.
1401
1402## 0.20.5 (2022-05-18)
1403
1404### Bug fixes
1405
1406Fix an issue where gutter elements without any markers in them would not get the `cm-gutterElement` class assigned.
1407
1408Fix an issue where DOM event handlers registered by plugins were retained indefinitely, even after the editor was reconfigured.
1409
1410## 0.20.4 (2022-05-03)
1411
1412### Bug fixes
1413
1414Prevent Mac-style behavior of inserting a period when the user inserts two spaces.
1415
1416Fix 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.
1417
1418## 0.20.3 (2022-04-27)
1419
1420### Bug fixes
1421
1422Fix a bug where the input handling could crash on repeated (or held) backspace presses on Chrome Android.
1423
1424## 0.20.2 (2022-04-22)
1425
1426### New features
1427
1428The new `hideOn` option to `hoverTooltip` allows more fine-grained control over when the tooltip should hide.
1429
1430## 0.20.1 (2022-04-20)
1431
1432### Bug fixes
1433
1434Remove debug statements that accidentally made it into 0.20.0.
1435
1436Fix a regression in `moveVertically`.
1437
1438## 0.20.0 (2022-04-20)
1439
1440### Breaking changes
1441
1442The deprecated interfaces `blockAtHeight`, `visualLineAtHeight`, `viewportLines`, `visualLineAt`, `scrollPosIntoView`, `scrollTo`, and `centerOn` were removed from the library.
1443
1444All 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.
1445
1446Atomic ranges are now specified through a facet (`EditorView.atomicRanges`).
1447
1448Scroll margins are now specified through a facet (`EditorView.scrollMargins`).
1449
1450Plugin fields no longer exist in the library (and are replaced by facets holding function values).
1451
1452This package no longer re-exports the Range type from @codemirror/state.
1453
1454### Bug fixes
1455
1456Fix a bug where zero-length block widgets could cause `viewportLineBlocks` to contain overlapping ranges.
1457
1458### New features
1459
1460The 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.
1461
1462`rectangularSelection` and `crosshairCursor` from @codemirror/rectangular-selection were merged into this package.
1463
1464This package now exports the tooltip functionality that used to live in @codemirror/tooltip.
1465
1466The exports from the old @codemirror/panel package are now available from this package.
1467
1468The exports from the old @codemirror/gutter package are now available from this package.
1469
1470## 0.19.48 (2022-03-30)
1471
1472### Bug fixes
1473
1474Fix 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).
1475
1476To 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.
1477
1478Make sure the view measures itself before the page is printed.
1479
1480Tweak types of view plugin defining functions to avoid TypeScript errors when the plugin value doesn't have any of the interface's properties.
1481
1482## 0.19.47 (2022-03-08)
1483
1484### Bug fixes
1485
1486Fix an issue where block widgets at the start of the viewport could break height computations.
1487
1488## 0.19.46 (2022-03-03)
1489
1490### Bug fixes
1491
1492Fix a bug where block widgets on the edges of viewports could cause the positioning of content to misalign with the gutter and height computations.
1493
1494Improve cursor height next to widgets.
1495
1496Fix a bug where mapping positions to screen coordinates could return incorred coordinates during composition.
1497
1498## 0.19.45 (2022-02-23)
1499
1500### Bug fixes
1501
1502Fix 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.
1503
1504Fix 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.
1505
1506Fix leaking of resize event handlers.
1507
1508## 0.19.44 (2022-02-17)
1509
1510### Bug fixes
1511
1512Fix a crash that occasionally occurred when drag-selecting in a way that scrolled the editor.
1513
1514### New features
1515
1516The new `EditorView.compositionStarted` property indicates whether a composition is starting.
1517
1518## 0.19.43 (2022-02-16)
1519
1520### Bug fixes
1521
1522Fix several issues where editing or composition went wrong due to our zero-width space kludge characters ending up in unexpected places.
1523
1524Make sure the editor re-measures its dimensions whenever its theme changes.
1525
1526Fix an issue where some keys on Android phones could leave the editor DOM unsynced with the actual document.
1527
1528## 0.19.42 (2022-02-05)
1529
1530### Bug fixes
1531
1532Fix a regression in cursor position determination after making an edit next to a widget.
1533
1534## 0.19.41 (2022-02-04)
1535
1536### Bug fixes
1537
1538Fix 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.
1539
1540Fix 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.
1541
1542Report an error when a replace decoration from a plugin crosses a line break, rather than silently ignoring it.
1543
1544Fix an issue where reading DOM changes was broken when `lineSeparator` contained more than one character.
1545
1546Make ordering of replace and mark decorations with the same extent and inclusivness more predictable by giving replace decorations precedence.
1547
1548Fix a bug where, on Chrome, replacement across line boundaries and next to widgets could cause bogus zero-width characters to appear in the content.
1549
1550## 0.19.40 (2022-01-19)
1551
1552### Bug fixes
1553
1554Make 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).
1555
1556Fix a bug that cause the editor to get confused about which content was visible after scrolling something into view.
1557
1558Fix a bug where the dummy elements rendered around widgets could end up in a separate set of wrapping marks, and thus become visible.
1559
1560`EditorView.moveVertically` now preserves the `assoc` property of the input range.
1561
1562Get rid of gaps between selection elements drawn by `drawSelection`.
1563
1564Fix an issue where replacing text next to a widget might leak bogus zero-width spaces into the document.
1565
1566Avoid browser selection mishandling when a focused view has `setState` called by eagerly refocusing it.
1567
1568## 0.19.39 (2022-01-06)
1569
1570### Bug fixes
1571
1572Make sure the editor signals a `geometryChanged` update when its width changes.
1573
1574### New features
1575
1576`EditorView.darkTheme` can now be queried to figure out whether the editor is using a dark theme.
1577
1578## 0.19.38 (2022-01-05)
1579
1580### Bug fixes
1581
1582Fix a bug that caused line decorations with a `class` property to suppress all other line decorations for that line.
1583
1584Fix a bug that caused scroll effects to be corrupted when further updates came in before they were applied.
1585
1586Fix 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.
1587
1588## 0.19.37 (2021-12-22)
1589
1590### Bug fixes
1591
1592Fix regression where plugin replacing decorations that span to the end of the line are ignored.
1593
1594## 0.19.36 (2021-12-22)
1595
1596### Bug fixes
1597
1598Fix a crash in `posAtCoords` when the position lies in a block widget that is rendered but scrolled out of view.
1599
1600Adding block decorations from a plugin now raises an error. Replacing decorations that cross lines are ignored, when provided by a plugin.
1601
1602Fix inverted interpretation of the `precise` argument to `posAtCoords`.
1603
1604## 0.19.35 (2021-12-20)
1605
1606### Bug fixes
1607
1608The 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).
1609
1610Fix an issue where backspacing out a selection on Chrome Android would sometimes only delete the last character due to event order issues.
1611
1612`posAtCoords`, without second argument, will no longer return null for positions below or above the document.
1613
1614## 0.19.34 (2021-12-17)
1615
1616### Bug fixes
1617
1618Fix a bug where content line elements would in some cases lose their `cm-line` class.
1619
1620## 0.19.33 (2021-12-16)
1621
1622### Breaking changes
1623
1624`EditorView.scrollTo` and `EditorView.centerOn` are deprecated in favor of `EditorView.scrollIntoView`, and will be removed in the next breaking release.
1625
1626### Bug fixes
1627
1628Fix an issue that could cause the editor to unnecessarily interfere with composition (especially visible on macOS Chrome).
1629
1630A composition started with multiple lines selected will no longer be interruptd by the editor.
1631
1632### New features
1633
1634The new `EditorView.scrollIntoView` function allows you to do more fine-grained scrolling.
1635
1636## 0.19.32 (2021-12-15)
1637
1638### Bug fixes
1639
1640Fix a bug where CodeMirror's own event handers would run even after a user-supplied handler called `preventDefault` on an event.
1641
1642Properly draw selections when negative text-indent is used for soft wrapping.
1643
1644Fix an issue where `viewportLineBlocks` could hold inaccurate height information when the vertical scaling changed.
1645
1646Fixes drop cursor positioning when the document is scrolled. Force a content measure when the editor comes into view
1647
1648Fix a bug that could cause the editor to not measure its layout the first time it came into view.
1649
1650## 0.19.31 (2021-12-13)
1651
1652### New features
1653
1654The package now exports a `dropCursor` extension that draws a cursor at the current drop position when dragging content over the editor.
1655
1656## 0.19.30 (2021-12-13)
1657
1658### Bug fixes
1659
1660Refine Android key event handling to work properly in a GBoard corner case where pressing Enter fires a bunch of spurious deleteContentBackward events.
1661
1662Fix a crash in `drawSelection` for some kinds of selections.
1663
1664Prevent a possibility where some content updates causes duplicate text to remain in DOM.
1665
1666### New features
1667
1668Support a `maxLength` option to `MatchDecorator` that allows user code to control how far it scans into hidden parts of viewport lines.
1669
1670## 0.19.29 (2021-12-09)
1671
1672### Bug fixes
1673
1674Fix a bug that could cause out-of-view editors to get a nonsensical viewport and fail to scroll into view when asked to.
1675
1676Fix a bug where would return 0 when clicking below the content if the last line was replaced with a block widget decoration.
1677
1678Fix 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.
1679
1680Fix an issue where composition could be interrupted if the browser created a new node inside a mark decoration node.
1681
1682## 0.19.28 (2021-12-08)
1683
1684### Bug fixes
1685
1686Fix an issue where pressing Enter on Chrome Android during composition did not fire key handlers for Enter.
1687
1688Avoid a Chrome bug where the virtual keyboard closes when pressing backspace after a widget.
1689
1690Fix an issue where the editor could show a horizontal scroll bar even after all lines that caused it had been deleted or changed.
1691
1692## 0.19.27 (2021-12-06)
1693
1694### Bug fixes
1695
1696Fix a bug that could cause `EditorView.plugin` to inappropriately return `null` during plugin initialization.
1697
1698Fix a bug where a block widget without `estimatedHeight` at the end of the document could fail to be drawn
1699
1700## 0.19.26 (2021-12-03)
1701
1702### New features
1703
1704Widgets can now define a `destroy` method that is called when they are removed from the view.
1705
1706## 0.19.25 (2021-12-02)
1707
1708### Bug fixes
1709
1710Widgets around replaced ranges are now visible when their side does not point towards the replaced range.
1711
1712A replaced line with a line decoration no longer creates an extra empty line block in the editor.
1713
1714The `scrollPastEnd` extension will now over-reserve space at the bottom of the editor on startup, to prevent restored scroll positions from being clipped.
1715
1716### New features
1717
1718`EditorView.editorAttributes` and `contentAttributes` may now hold functions that produce the attributes.
1719
1720## 0.19.24 (2021-12-01)
1721
1722### Bug fixes
1723
1724Fix a bug where `lineBlockAt`, for queries inside the viewport, would always return the first line in the viewport.
1725
1726## 0.19.23 (2021-11-30)
1727
1728### Bug fixes
1729
1730Fix an issue where after some kinds of changes, `EditorView.viewportLineBlocks` held an out-of-date set of blocks.
1731
1732### New features
1733
1734Export `EditorView.documentPadding`, with information about the vertical padding of the document.
1735
1736## 0.19.22 (2021-11-30)
1737
1738### Bug fixes
1739
1740Fix an issue where editors with large vertical padding (for example via `scrollPastEnd`) could sometimes lose their scroll position on Chrome.
1741
1742Avoid some unnecessary DOM measuring work by more carefully checking whether it is needed.
1743
1744### New features
1745
1746The new `elementAtHeight`, `lineBlockAtHeight`, and `lineBlockAt` methods provide a simpler and more efficient replacement for the (now deprecated) `blockAtHeight`, `visualLineAtHeight`, and `visualLineAt` methods.
1747
1748The 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.
1749
1750The editor view's new `viewportLineBlocks` property provides an array of in-viewport line blocks, and replaces the (now deprecated) `viewportLines` method.
1751
1752## 0.19.21 (2021-11-26)
1753
1754### Bug fixes
1755
1756Fix a problem where the DOM update would unnecessarily trigger browser relayouts.
1757
1758## 0.19.20 (2021-11-19)
1759
1760### Bug fixes
1761
1762Run a measure cycle when the editor's size spontaneously changes.
1763
1764## 0.19.19 (2021-11-17)
1765
1766### Bug fixes
1767
1768Fix a bug that caused the precedence of `editorAttributes` and `contentAttributes` to be inverted, making lower-precedence extensions override higher-precedence ones.
1769
1770## 0.19.18 (2021-11-16)
1771
1772### Bug fixes
1773
1774Fix an issue where the editor wasn't aware it was line-wrapping with its own `lineWrapping` extension enabled.
1775
1776## 0.19.17 (2021-11-16)
1777
1778### Bug fixes
1779
1780Avoid an issue where stretches of whitespace on line wrap points could cause the cursor to be placed outside of the content.
1781
1782## 0.19.16 (2021-11-11)
1783
1784### Breaking changes
1785
1786Block replacement decorations now default to inclusive, because non-inclusive block decorations are rarely what you need.
1787
1788### Bug fixes
1789
1790Fix an issue that caused block widgets to always have a large side value, making it impossible to show them between to replacement decorations.
1791
1792Fix a crash that could happen after some types of viewport changes, due to a bug in the block widget view data structure.
1793
1794## 0.19.15 (2021-11-09)
1795
1796### Bug fixes
1797
1798Fix a bug where the editor would think it was invisible when the document body was given screen height and scroll behavior.
1799
1800Fix selection reading inside a shadow root on iOS.
1801
1802## 0.19.14 (2021-11-07)
1803
1804### Bug fixes
1805
1806Fix an issue where typing into a read-only editor would move the selection.
1807
1808Fix slowness when backspace is held down on iOS.
1809
1810## 0.19.13 (2021-11-06)
1811
1812### Bug fixes
1813
1814Fix a bug where backspace, enter, and delete would get applied twice on iOS.
1815
1816## 0.19.12 (2021-11-04)
1817
1818### Bug fixes
1819
1820Make sure the workaround for the lost virtual keyboard on Chrome Android also works on slower phones. Slight style change in beforeinput handler
1821
1822Avoid failure cases in viewport-based rendering of very long lines.
1823
1824## 0.19.11 (2021-11-03)
1825
1826### Breaking changes
1827
1828`EditorView.scrollPosIntoView` has been deprecated. Use the `EditorView.scrollTo` effect instead.
1829
1830### New features
1831
1832The new `EditorView.centerOn` effect can be used to scroll a given range to the center of the view.
1833
1834## 0.19.10 (2021-11-02)
1835
1836### Bug fixes
1837
1838Don't crash when `IntersectionObserver` fires its callback without any records. Try to handle some backspace issues on Chrome Android
1839
1840Using backspace near uneditable widgets on Chrome Android should now be more reliable.
1841
1842Work 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.
1843
1844Work around bogus composition changes created by Chrome Android after handled backspace presses.
1845
1846Work around an issue where tapping on an uneditable node in the editor would sometimes fail to show the virtual keyboard on Chrome Android.
1847
1848Prevent translation services from translating the editor content. Show direction override characters as special chars by default
1849
1850`specialChars` will now, by default, replace direction override chars, to mitigate https://trojansource.codes/ attacks.
1851
1852### New features
1853
1854The editor view will, if `parent` is given but `root` is not, derive the root from the parent element.
1855
1856Line decorations now accept a `class` property to directly add DOM classes to the line.
1857
1858## 0.19.9 (2021-10-01)
1859
1860### Bug fixes
1861
1862Fix 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.
1863
1864Fix an occasional crash in the selection drawing extension.
1865
1866## 0.19.8 (2021-09-26)
1867
1868### Bug fixes
1869
1870Fix a bug that could, on DOM changes near block widgets, insert superfluous line breaks.
1871
1872Make interacting with a destroyed editor view do nothing, rather than crash, to avoid tripping people up with pending timeouts and such.
1873
1874Make sure `ViewUpdate.viewportChanged` is true whenever `visibleRanges` changes, so that plugins acting only on visible ranges can use it to check when to update.
1875
1876Fix line-wise cut on empty lines.
1877
1878## 0.19.7 (2021-09-13)
1879
1880### Bug fixes
1881
1882The view is now aware of the new `EditorState.readOnly` property, and suppresses events that modify the document when it is true.
1883
1884## 0.19.6 (2021-09-10)
1885
1886### Bug fixes
1887
1888Remove a `console.log` that slipped into the previous release.
1889
1890## 0.19.5 (2021-09-09)
1891
1892### New features
1893
1894The new `EditorView.scrollTo` effect can be used to scroll a given range into view.
1895
1896## 0.19.4 (2021-09-01)
1897
1898### Bug fixes
1899
1900Fix an issue where lines containing just a widget decoration wrapped in a mark decoration could be displayed with 0 height.
1901
1902## 0.19.3 (2021-08-25)
1903
1904### Bug fixes
1905
1906Fix a view corruption that could happen in situations involving overlapping mark decorations.
1907
1908## 0.19.2 (2021-08-23)
1909
1910### New features
1911
1912The 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.
1913
1914## 0.19.1 (2021-08-11)
1915
1916### Breaking changes
1917
1918The view now emits new-style user event annotations for the transactions it generates.
1919
1920### Bug fixes
1921
1922Fix a bug where `coordsAtPos` would allow the passed `side` argument to override widget sides, producing incorrect cursor positions.
1923
1924Fix a bug that could cause content lines to be misaligned in certain situations involving widgets at the end of lines.
1925
1926Fix 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.
1927
1928## 0.18.19 (2021-07-12)
1929
1930### Bug fixes
1931
1932Fix a regression where `EditorView.editable.of(false)` didn't disable editing on Webkit-based browsers.
1933
1934## 0.18.18 (2021-07-06)
1935
1936### Bug fixes
1937
1938Fix a bug that caused `EditorView.moveVertically` to only move by one line, even when given a custom distance, in some cases.
1939
1940Hide Safari's native bold/italic/underline controls for the content.
1941
1942Fix a CSS problem that prevented Safari from breaking words longer than the line in line-wrapping mode.
1943
1944Avoid a problem where composition would be inappropriately abored on Safari.
1945
1946Fix drag-selection that scrolls the content by dragging past the visible viewport.
1947
1948### New features
1949
1950`posAtCoords` now has an imprecise mode where it'll return an approximate position even for parts of the document that aren't currently rendered.
1951
1952## 0.18.17 (2021-06-14)
1953
1954### Bug fixes
1955
1956Make `drawSelection` behave properly when lines are split by block widgets.
1957
1958Make sure drawn selections that span a single line break don't leave a gap between the lines.
1959
1960## 0.18.16 (2021-06-03)
1961
1962### Bug fixes
1963
1964Fix a crash that could occur when the document changed during mouse selection.
1965
1966Fix a bug where composition inside styled content would sometimes be inappropriately aborted by editor DOM updates.
1967
1968### New features
1969
1970`MouseSelectionStyle.update` may now return true to indicate it should be queried for a new selection after the update.
1971
1972## 0.18.15 (2021-06-01)
1973
1974### Bug fixes
1975
1976Fix a bug that would, in very specific circumstances, cause `posAtCoords` to go into an infinite loop in Safari.
1977
1978Fix a bug where some types of IME input on Mobile Safari would drop text.
1979
1980## 0.18.14 (2021-05-28)
1981
1982### Bug fixes
1983
1984Fix an issue where the DOM selection was sometimes not properly updated when next to a widget.
1985
1986Invert the order in which overlapping decorations are drawn so that higher-precedence decorations are nested inside lower-precedence ones (and thus override their styling).
1987
1988Fix a but in `posAtCoords` where it would in some situations return -1 instead of `null`.
1989
1990### New features
1991
1992A new plugin field, `PluginField.atomicRanges`, can be used to cause cursor motion to skip past some ranges of the document.
1993
1994## 0.18.13 (2021-05-20)
1995
1996### Bug fixes
1997
1998Fix a bug that would cause the content DOM update to crash in specific circumstances.
1999
2000Work around an issue where, after some types of changes, Mobile Safari would ignore Enter presses.
2001
2002Make iOS enter and backspace handling more robust, so that platform bugs are less likely to break those keys in the editor.
2003
2004Fix a regression where Esc + Tab no longer allowed the user to exit the editor.
2005
2006### New features
2007
2008You can now drop text files into the editor.
2009
2010## 0.18.12 (2021-05-10)
2011
2012### Bug fixes
2013
2014Work around a Mobile Safari bug where, after backspacing out the last character on a line, Enter didn't work anymore.
2015
2016Work 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.
2017
2018## 0.18.11 (2021-04-30)
2019
2020### Bug fixes
2021
2022Add an attribute to prevent the Grammarly browser extension from messing with the editor content.
2023
2024Fix more issues around selection handling a Shadow DOM in Safari.
2025
2026## 0.18.10 (2021-04-27)
2027
2028### Bug fixes
2029
2030Fix a bug where some types of updates wouldn't properly cause marks around the changes to be joined in the DOM.
2031
2032Fix an issue where the content and gutters in a fixed-height editor could be smaller than the editor height.
2033
2034Fix a crash on Safari when initializing an editor in an unfocused window.
2035
2036Fix a bug where the editor would incorrectly conclude it was out of view in some types of absolutely positioned parent elements.
2037
2038## 0.18.9 (2021-04-23)
2039
2040### Bug fixes
2041
2042Fix a crash that occurred when determining DOM coordinates in some specific situations.
2043
2044Fix a crash when a DOM change that ended at a zero-width view element (widget) removed that element from the DOM.
2045
2046Disable autocorrect and autocapitalize by default, since in most code-editor contexts they get in the way. You can use `EditorView.contentAttributes` to override this.
2047
2048Fix a bug that interfered with native touch selection handling on Android.
2049
2050Fix an unnecessary DOM update after composition that would disrupt touch selection on Android.
2051
2052Add a workaround for Safari's broken selection reporting when the editor is in a shadow DOM tree.
2053
2054Fix select-all from the context menu on Safari.
2055
2056## 0.18.8 (2021-04-19)
2057
2058### Bug fixes
2059
2060Handle selection replacements where the inserted text matches the start/end of the replaced text better.
2061
2062Fix an issue where the editor would miss scroll events when it was placed in a DOM component slot.
2063
2064## 0.18.7 (2021-04-13)
2065
2066### Bug fixes
2067
2068Fix a crash when drag-selecting out of the editor with editable turned off.
2069
2070Backspace and delete now largely work in an editor without a keymap.
2071
2072Pressing backspace on iOS should now properly update the virtual keyboard's capitalize and autocorrect state.
2073
2074Prevent random line-wrapping in (non-wrapping) editors on Mobile Safari.
2075## 0.18.6 (2021-04-08)
2076
2077### Bug fixes
2078
2079Fix an issue in the compiled output that would break the code when minified with terser.
2080
2081## 0.18.5 (2021-04-07)
2082
2083### Bug fixes
2084
2085Improve handling of bidi text with brackets (conforming to Unicode 13's bidi algorithm).
2086
2087Fix the position where `drawSelection` displays the cursor on bidi boundaries.
2088
2089## 0.18.4 (2021-04-07)
2090
2091### Bug fixes
2092
2093Fix an issue where the default focus ring gets obscured by the gutters and active line.
2094
2095Fix an issue where the editor believed Chrome Android didn't support the CSS `tab-size` style.
2096
2097Don't style active lines when there are non-empty selection ranges, so that the active line background doesn't obscure the selection.
2098
2099Make iOS autocapitalize update properly when you press Enter.
2100
2101## 0.18.3 (2021-03-19)
2102
2103### Breaking changes
2104
2105The outer DOM element now has class `cm-editor` instead of `cm-wrap` (`cm-wrap` will be present as well until 0.19).
2106
2107### Bug fixes
2108
2109Improve behavior of `posAtCoords` when the position is near text but not in any character's actual box.
2110
2111## 0.18.2 (2021-03-19)
2112
2113### Bug fixes
2114
2115Triple-clicking now selects the line break after the clicked line (if any).
2116
2117Fix an issue where the `drawSelection` plugin would fail to draw the top line of the selection when it started in an empty line.
2118
2119Fix 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.
2120
2121## 0.18.1 (2021-03-05)
2122
2123### Bug fixes
2124
2125Fix an issue where, on iOS, some types of IME would cause the composed content to be deleted when confirming a composition.
2126
2127## 0.18.0 (2021-03-03)
2128
2129### Breaking changes
2130
2131The `themeClass` function and ``-style selectors in themes are no longer supported (prefixing with `cm-` should be done manually now).
2132
2133Themes must now use `&` (instead of an extra `$`) to target the editor wrapper element.
2134
2135The 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.
2136
2137## 0.17.13 (2021-03-03)
2138
2139### Bug fixes
2140
2141Work around a Firefox bug where it won't draw the cursor when it is between uneditable elements.
2142
2143Fix a bug that broke built-in mouse event handling.
2144
2145## 0.17.12 (2021-03-02)
2146
2147### Bug fixes
2148
2149Avoid interfering with touch events, to allow native selection behavior.
2150
2151Fix a bug that broke sub-selectors with multiple `&` placeholders in themes.
2152
2153## 0.17.11 (2021-02-25)
2154
2155### Bug fixes
2156
2157Fix vertical cursor motion on Safari with a larger line-height.
2158
2159Fix incorrect selection drawing (with `drawSelection`) when the selection spans to just after a soft wrap point.
2160
2161Fix an issue where compositions on Safari were inappropriately aborted in some circumstances.
2162
2163The view will now redraw when the `EditorView.phrases` facet changes, to make sure translated text is properly updated.
2164
2165## 0.17.10 (2021-02-22)
2166
2167### Bug fixes
2168
2169Long words without spaces, when line-wrapping is enabled, are now properly broken.
2170
2171Fix the horizontal position of selections drawn by `drawSelection` in right-to-left editors with a scrollbar.
2172
2173## 0.17.9 (2021-02-18)
2174
2175### Bug fixes
2176
2177Fix an issue where pasting linewise at the start of a line left the cursor before the inserted content.
2178
2179## 0.17.8 (2021-02-16)
2180
2181### Bug fixes
2182
2183Fix a problem where the DOM selection and the editor state could get out of sync in non-editable mode.
2184
2185Fix a crash when the editor was hidden on Safari, due to `getClientRects` returning an empty list.
2186
2187Prevent Firefox from making the scrollable element keyboard-focusable.
2188
2189## 0.17.7 (2021-01-25)
2190
2191### New features
2192
2193Add an `EditorView.announce` state effect that can be used to conveniently provide screen reader announcements.
2194
2195## 0.17.6 (2021-01-22)
2196
2197### Bug fixes
2198
2199Avoid creating very high scroll containers for large documents so that we don't overflow the DOM's fixed-precision numbers.
2200
2201## 0.17.5 (2021-01-15)
2202
2203### Bug fixes
2204
2205Fix a bug that would create space-filling placeholders with incorrect height when document is very large.
2206
2207## 0.17.4 (2021-01-14)
2208
2209### Bug fixes
2210
2211The `drawSelection` extension will now reuse cursor DOM nodes when the number of cursors stays the same, allowing some degree of cursor transition animation.
2212
2213Makes highlighted special characters styleable (``) and fix their default look in dark themes to have appropriate contrast.
2214
2215### New features
2216
2217Adds a new `MatchDecorator` helper class which can be used to easily maintain decorations on content that matches a regular expression.
2218
2219## 0.17.3 (2021-01-06)
2220
2221### New features
2222
2223The package now also exports a CommonJS module.
2224
2225## 0.17.2 (2021-01-04)
2226
2227### Bug fixes
2228
2229Work around Chrome problem where the native shift-enter behavior inserts two line breaks.
2230
2231Make bracket closing and bracket pair removing more reliable on Android.
2232
2233Fix bad cursor position and superfluous change transactions after pressing enter when in a composition on Android.
2234
2235Fix issue where the wrong character was deleted when backspacing out a character before an identical copy of that character on Android.
2236
2237## 0.17.1 (2020-12-30)
2238
2239### Bug fixes
2240
2241Fix a bug that prevented `ViewUpdate.focusChanged` from ever being true.
2242
2243## 0.17.0 (2020-12-29)
2244
2245### Breaking changes
2246
2247First numbered release.
2248