prosemirror-view
Advanced tools
Comparing version 1.3.7 to 1.3.8
@@ -0,1 +1,7 @@ | ||
## 1.3.8 (2018-07-24) | ||
### Bug fixes | ||
Fix an issue where Chrome Android would move the cursor forward by one after backspace-joining two paragraphs. | ||
## 1.3.7 (2018-07-02) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-view", | ||
"version": "1.3.7", | ||
"version": "1.3.8", | ||
"description": "ProseMirror's view component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -18,2 +18,3 @@ const result = {} | ||
result.ios = !ie && /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent) | ||
result.android = /Android \d/.test(navigator.userAgent) | ||
result.webkit = !ie && 'WebkitAppearance' in document.documentElement.style | ||
@@ -20,0 +21,0 @@ result.safari = /Apple Computer/.test(navigator.vendor) |
@@ -250,4 +250,9 @@ import {Fragment, DOMParser} from "prosemirror-model" | ||
looksLikeJoin(doc, change.start, change.endA, $from, $to) && | ||
view.someProp("handleKeyDown", f => f(view, keyEvent(8, "Backspace")))) | ||
view.someProp("handleKeyDown", f => f(view, keyEvent(8, "Backspace")))) { | ||
if (browser.android && browser.chrome) { // #820 | ||
view.selectionReader.suppressUpdates = true | ||
setTimeout(() => view.selectionReader.suppressUpdates = false, 50) | ||
} | ||
return | ||
} | ||
@@ -254,0 +259,0 @@ let from = mapping.map(change.start), to = mapping.map(change.endA, -1) |
@@ -16,2 +16,3 @@ import {TextSelection, NodeSelection} from "prosemirror-state" | ||
this.ignoreUpdates = false | ||
this.suppressUpdates = false | ||
this.poller = poller(this) | ||
@@ -54,3 +55,3 @@ | ||
// : (?string) → bool | ||
// : (?string) | ||
// When the DOM selection changes in a notable manner, modify the | ||
@@ -60,2 +61,3 @@ // current selection state to match. | ||
if (this.ignoreUpdates || !this.domChanged() || !hasFocusAndSelection(this.view)) return | ||
if (this.suppressUpdates) return selectionToDOM(this.view) | ||
if (!this.view.inDOMChange) this.view.domObserver.flush() | ||
@@ -62,0 +64,0 @@ if (this.view.inDOMChange) return |
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
8284
730510
24