Skip to content

Commit

Permalink
Fix reference to wrong DOM element in DOMObserver.onSelectionChange
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Sep 6, 2024
1 parent 6064191 commit d6c45ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/domobserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export class DOMObserver {
let wasChanged = this.selectionChanged
if (!this.readSelectionRange() || this.delayedAndroidKey) return
let {view} = this, sel = this.selectionRange
if (view.state.facet(editable) ? view.root.activeElement != this.dom : !hasSelection(view.dom, sel))
if (view.state.facet(editable) ? view.root.activeElement != this.dom : !hasSelection(this.dom, sel))
return

let context = sel.anchorNode && view.docView.nearest(sel.anchorNode)
Expand Down

0 comments on commit d6c45ca

Please sign in to comment.