Skip to content
Snippets Groups Projects
Commit e4b1293d authored by Adrian Heine's avatar Adrian Heine
Browse files

Don't check whether document has focus for takeFocus

Closes #4975. Checking `hasFocus` is a reasonable idea, but in Firefox
`hasFocus` returns false on `mousedown` if the window, but not the document
was focussed before. This leads to a wrong cursor in `contenteditable`
input style.
parent e5a13e62
No related branches found
No related tags found
No related merge requests found
......@@ -115,7 +115,7 @@ function endOperation_W2(op) {
cm.display.maxLineChanged = false
}
let takeFocus = op.focus && op.focus == activeElt() && (!document.hasFocus || document.hasFocus())
let takeFocus = op.focus && op.focus == activeElt()
if (op.preparedSelection)
cm.display.input.showSelection(op.preparedSelection, takeFocus)
if (op.updatedDisplay || op.startHeight != cm.doc.height)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment