--- node_modules/prosemirror-view/dist/index.js.orig 2018-03-14 11:46:29.000000000 +0100 +++ node_modules/prosemirror-view/dist/index.js 2018-03-15 13:30:11.964539414 +0100 @@ -1954,7 +1954,7 @@ // When the DOM selection changes in a notable manner, modify the // current selection state to match. SelectionReader.prototype.readFromDOM = function readFromDOM (origin) { - if (this.ignoreUpdates || !this.domChanged() || !hasFocusAndSelection(this.view)) { return } + if (this.ignoreUpdates || !this.domChanged()) { return } if (!this.view.inDOMChange) { this.view.domObserver.flush(); } if (this.view.inDOMChange) { return } @@ -2193,7 +2193,7 @@ } function hasFocusAndSelection(view) { - if (view.editable && view.root.activeElement != view.dom) { return false } + if (view.editable && !view.hasFocus()) { return false } return hasSelection(view) } @@ -4261,7 +4261,7 @@ // :: () → bool // Query whether the view has focus. EditorView.prototype.hasFocus = function hasFocus () { - return this.root.activeElement == this.dom + return this.dom.contains(this.root.activeElement); }; // :: ()