prosemirror-view
Advanced tools
Comparing version 1.4.3 to 1.4.4
@@ -0,1 +1,9 @@ | ||
## 1.4.4 (2018-08-13) | ||
### Bug fixes | ||
Fix an issue where a non-empty DOM selection could stick around even though the state's selection is empty. | ||
Fix an issue where Firefox would create an extra cursor position when arrow-keying through a widget. | ||
## 1.4.3 (2018-08-12) | ||
@@ -2,0 +10,0 @@ |
{ | ||
"name": "prosemirror-view", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"description": "ProseMirror's view component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -60,2 +60,6 @@ import {Selection, NodeSelection, TextSelection} from "prosemirror-state" | ||
let moveNode, moveOffset, force = false | ||
// Gecko will do odd things when the selection is directly in front | ||
// of a non-editable node, so in that case, move it into the next | ||
// node if possible. Issue prosemirror/prosemirror#832. | ||
if (browser.gecko && node.nodeType == 1 && offset < nodeLen(node) && isIgnorable(node.childNodes[offset])) force = true | ||
for (;;) { | ||
@@ -62,0 +66,0 @@ if (offset > 0) { |
@@ -82,5 +82,2 @@ import {TextSelection, NodeSelection} from "prosemirror-state" | ||
} | ||
let preserve = !inWidget && head == selection.head && $anchor.pos == selection.anchor && | ||
(!this.view.cursorWrapper || domSel.isCollapsed && origin != "pointer") | ||
if (preserve) this.storeDOMState(selection) | ||
if (!this.view.state.selection.eq(selection)) { | ||
@@ -90,3 +87,3 @@ let tr = this.view.state.tr.setSelection(selection) | ||
this.view.dispatch(tr) | ||
} else if (!preserve) { | ||
} else { | ||
selectionToDOM(this.view) | ||
@@ -93,0 +90,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
734175
8312