prosemirror-view
Advanced tools
Comparing version
@@ -0,1 +1,7 @@ | ||
## 1.15.1 (2020-07-09) | ||
### Bug fixes | ||
Work around another issue where Chrome misreports the DOM selection. | ||
## 1.15.0 (2020-06-24) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-view", | ||
"version": "1.15.0", | ||
"version": "1.15.1", | ||
"description": "ProseMirror's view component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -418,3 +418,3 @@ import {NodeSelection} from "prosemirror-state" | ||
let {focusOffset: offset, focusNode: node} = root.getSelection() | ||
return node && node.nodeType == 1 ? [node, offset, node.childNodes[offset - 1], node.childNodes[offset]] : null | ||
return node ? [node, offset, node.childNodes[offset - 1], node.childNodes[offset]] : null | ||
} | ||
@@ -424,5 +424,3 @@ | ||
let newContext = selectionContext(root) | ||
if (!newContext || newContext[0].nodeType == 3) return false | ||
for (let i = 0; i < context.length; i++) if (newContext[i] != context[i]) return true | ||
return false | ||
return newContext && context.some((e, i) => e != newContext[i]) | ||
} | ||
@@ -429,0 +427,0 @@ |
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
1422458
-0.06%13766
-0.04%