prosemirror-view
Advanced tools
Comparing version 1.18.8 to 1.18.9
@@ -0,1 +1,7 @@ | ||
## 1.18.9 (2021-07-11) | ||
### Bug fixes | ||
Fix a bug in the previous release where `handleClickOn` wasn't fired anymore for clicks with the middle or right mouse button. | ||
## 1.18.8 (2021-06-23) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-view", | ||
"version": "1.18.8", | ||
"version": "1.18.9", | ||
"description": "ProseMirror's view component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -288,3 +288,3 @@ import {Selection, NodeSelection, TextSelection} from "prosemirror-state" | ||
this.selectNode = event[selectNodeModifier] | ||
this.allowDefault = event.shiftKey || event.button != 0 | ||
this.allowDefault = event.shiftKey | ||
@@ -356,15 +356,16 @@ let targetNode, targetPos | ||
event.preventDefault() | ||
} else if (this.flushed || | ||
// Safari ignores clicks on draggable elements | ||
(browser.safari && this.mightDrag && !this.mightDrag.node.isAtom) || | ||
// Chrome will sometimes treat a node selection as a | ||
// cursor, but still report that the node is selected | ||
// when asked through getSelection. You'll then get a | ||
// situation where clicking at the point where that | ||
// (hidden) cursor is doesn't change the selection, and | ||
// thus doesn't get a reaction from ProseMirror. This | ||
// works around that. | ||
(browser.chrome && !(this.view.state.selection instanceof TextSelection) && | ||
Math.min(Math.abs(pos.pos - this.view.state.selection.from), | ||
Math.abs(pos.pos - this.view.state.selection.to)) <= 2)) { | ||
} else if (event.button == 0 && | ||
(this.flushed || | ||
// Safari ignores clicks on draggable elements | ||
(browser.safari && this.mightDrag && !this.mightDrag.node.isAtom) || | ||
// Chrome will sometimes treat a node selection as a | ||
// cursor, but still report that the node is selected | ||
// when asked through getSelection. You'll then get a | ||
// situation where clicking at the point where that | ||
// (hidden) cursor is doesn't change the selection, and | ||
// thus doesn't get a reaction from ProseMirror. This | ||
// works around that. | ||
(browser.chrome && !(this.view.state.selection instanceof TextSelection) && | ||
Math.min(Math.abs(pos.pos - this.view.state.selection.from), | ||
Math.abs(pos.pos - this.view.state.selection.to)) <= 2))) { | ||
updateSelection(this.view, Selection.near(this.view.state.doc.resolve(pos.pos)), "pointer") | ||
@@ -371,0 +372,0 @@ event.preventDefault() |
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
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
1531002
14253