@codemirror/view
Advanced tools
Changelog
0.19.24 (2021-12-01)
Fix a bug where lineBlockAt
, for queries inside the viewport, would always return the first line in the viewport.
Changelog
0.19.23 (2021-11-30)
Fix an issue where after some kinds of changes, EditorView.viewportLineBlocks
held an out-of-date set of blocks.
Export EditorView.documentPadding
, with information about the vertical padding of the document.
Changelog
0.19.22 (2021-11-30)
Fix an issue where editors with large vertical padding (for example via scrollPastEnd
) could sometimes lose their scroll position on Chrome.
Avoid some unnecessary DOM measuring work by more carefully checking whether it is needed.
The new elementAtHeight
, lineBlockAtHeight
, and lineBlockAt
methods provide a simpler and more efficient replacement for the (now deprecated) blockAtHeight
, visualLineAtHeight
, and visualLineAt
methods.
The 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.
The editor view's new viewportLineBlocks
property provides an array of in-viewport line blocks, and replaces the (now deprecated) viewportLines
method.
Changelog
0.19.21 (2021-11-26)
Fix a problem where the DOM update would unnecessarily trigger browser relayouts.
Changelog
0.19.20 (2021-11-19)
Run a measure cycle when the editor's size spontaneously changes.
Changelog
0.19.19 (2021-11-17)
Fix a bug that caused the precedence of editorAttributes
and contentAttributes
to be inverted, making lower-precedence extensions override higher-precedence ones.
Changelog
0.19.18 (2021-11-16)
Fix an issue where the editor wasn't aware it was line-wrapping with its own lineWrapping
extension enabled.
Changelog
0.19.17 (2021-11-16)
Avoid an issue where stretches of whitespace on line wrap points could cause the cursor to be placed outside of the content.
Changelog
0.19.16 (2021-11-11)
Block replacement decorations now default to inclusive, because non-inclusive block decorations are rarely what you need.
Fix an issue that caused block widgets to always have a large side value, making it impossible to show them between to replacement decorations.
Fix a crash that could happen after some types of viewport changes, due to a bug in the block widget view data structure.