prosemirror-view
Advanced tools
Comparing version 1.19.1 to 1.19.2
@@ -0,1 +1,7 @@ | ||
## 1.19.2 (2021-08-19) | ||
### Bug fixes | ||
Avoid some bugs around drag-selecting by delaying synchronization between the DOM and the state selection until the end of the drag. | ||
## 1.19.1 (2021-08-16) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-view", | ||
"version": "1.19.1", | ||
"version": "1.19.2", | ||
"description": "ProseMirror's view component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -289,2 +289,3 @@ import {Selection, NodeSelection, TextSelection} from "prosemirror-state" | ||
this.allowDefault = event.shiftKey | ||
this.delayedSelectionSync = false | ||
@@ -340,2 +341,3 @@ let targetNode, targetPos | ||
} | ||
if (this.delayedSelectionSync) setTimeout(() => selectionToDOM(this.view)) | ||
this.view.mouseDown = null | ||
@@ -342,0 +344,0 @@ } |
@@ -45,2 +45,8 @@ import {TextSelection, NodeSelection} from "prosemirror-state" | ||
if (!force && view.mouseDown && view.mouseDown.allowDefault) { | ||
view.mouseDown.delayedSelectionSync = true | ||
view.domObserver.setCurSelection() | ||
return | ||
} | ||
view.domObserver.disconnectSelection() | ||
@@ -47,0 +53,0 @@ |
@@ -1240,4 +1240,4 @@ import {DOMSerializer, Fragment, Mark} from "prosemirror-model" | ||
/\n$/.test(lastChild.node.text)) { | ||
// Avoid a bug in Safari's cursor drawing (#1165) | ||
if (browser.safari && lastChild && lastChild.dom.contentEditable == "false") | ||
// Avoid bugs in Safari's cursor drawing (#1165) and Chrome's mouse selection (#1152) | ||
if ((browser.safari || browser.chrome) && lastChild && lastChild.dom.contentEditable == "false") | ||
this.addHackNode("IMG") | ||
@@ -1244,0 +1244,0 @@ this.addHackNode("BR") |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1555915
14488