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