@codemirror/view
Advanced tools
Changelog
6.11.2 (2023-05-13)
Fix a bug where the crosshairCursor
extension could, when non-native key events were fired, trigger disruptive and needless view updates.
Fix an Android issue where backspacing at the front of a line with widget decorations could replace those decorations with their text content.
Respect scroll margins when scrolling the target of drag-selection into view.
Validate selection offsets reported by the browser, to work around Safari giving us invalid values in some cases.
Changelog
6.11.1 (2023-05-09)
Don't preserve the DOM around a composition that spans multiple lines.
Changelog
6.11.0 (2023-05-03)
Gutters now support a widgetMarker
option that can be used to add markers next to block widgets.
Changelog
6.10.1 (2023-05-01)
Limit cursor height in front of custom placeholder DOM elements.
Changelog
6.10.0 (2023-04-25)
Fix a crash in drawSelection
when a measured position falls on a position that doesn't have corresponding screen coordinates.
Work around unhelpful interaction observer behavior that could cause the editor to not notice it was visible.
Give the cursor next to a line-wrapped placeholder a single-line height.
Make sure drop events below the editable element in a fixed-height editor get handled properly.
Widget decorations can now define custom coordsAtPos
methods to control the way the editor computes screen positions at or in the widget.
Changelog
6.9.6 (2023-04-21)
Fix an issue where, when escape was pressed followed by a key that the editor handled, followed by tab, the tab would still move focus.
Fix an issue where, in some circumstances, the editor would ignore text changes at the end of a composition.
Allow inline widgets to be updated to a different length via updateDOM
.
Changelog
6.9.5 (2023-04-17)
Avoid disrupting the composition in specific cases where Safari invasively changes the DOM structure in the middle of a composition.
Fix a bug that prevented destroy
being called on hover tooltips.
Fix a bug where the editor could take focus when content changes required it to restore the DOM selection.
Fix height layout corruption caused by a division by zero.
Make 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.
Changelog
6.9.4 (2023-04-11)
Make the editor scroll while dragging a selection near its sides, even if the cursor isn't outside the scrollable element.
Fix a bug that interrupted composition after widgets in some circumstances on Firefox.
Make 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.
Make it possible to remove additional selection ranges by clicking on them with ctrl/cmd held, even if they aren't cursors.
Keep widget buffers between widgets and compositions, since removing them confuses IME on macOS Firefox.
Fix a bug where, for DOM changes that put the selection in the middle of the changed range, the editor incorrectly set its selection state.
Fix a bug where coordsAtPos
could return a coordinates before the line break when querying a line-wrapped position with a positive side
.
Changelog
6.9.3 (2023-03-21)
Work around a Firefox issue that caused coordsAtPos
to return rectangles with the full line height on empty lines.
Opening a context menu by clicking below the content element but inside the editor now properly shows the browser's menu for editable elements.
Fix an issue that broke composition (especially of Chinese IME) after widget decorations.
Fix an issue that would cause the cursor to jump around during compositions inside nested mark decorations.
Changelog
6.9.2 (2023-03-08)
Work around a Firefox CSS bug that caused cursors to stop blinking in a scrolled editor.
Fix an issue in drawSelection
where the selection extended into the editor's padding.
Fix pasting of links copied from iOS share sheet.