Skip to content

Commit 64cffa1

Browse files
committed
Make sure line backgrounds aren't treated as content in contentEditable mode
Issue codemirror#4194 Closes codemirror#4500
1 parent e8f3146 commit 64cffa1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/display/update_line.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ function updateLineGutter(cm, lineView, lineN, dims) {
9696
let wrap = ensureLineWrapped(lineView)
9797
lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass,
9898
`left: ${cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth}px; width: ${dims.gutterTotalWidth}px`)
99+
cm.display.input.setUneditable(gutterWrap)
99100
wrap.insertBefore(lineView.gutterBackground, lineView.text)
100101
}
101102
let markers = lineView.line.gutterMarkers

0 commit comments

Comments
 (0)