prosemirror-view
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -0,1 +1,7 @@ | ||
## 1.5.1 (2018-08-24) | ||
### Bug fixes | ||
Fix issue where some DOM selections would cause a non-editable view to crash when reading the selection. | ||
## 1.5.0 (2018-08-21) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-view", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "ProseMirror's view component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -305,3 +305,4 @@ import {TextSelection, NodeSelection} from "prosemirror-state" | ||
// element. | ||
return view.dom.contains(sel.anchorNode.nodeType == 3 ? sel.anchorNode.parentNode : sel.anchorNode) | ||
return view.dom.contains(sel.anchorNode.nodeType == 3 ? sel.anchorNode.parentNode : sel.anchorNode) && | ||
(view.editable || view.dom.contains(sel.focusNode.nodeType == 3 ? sel.focusNode.parentNode : sel.focusNode)) | ||
} catch(_) { | ||
@@ -308,0 +309,0 @@ return false |
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
735420
8318