prosemirror-view
Advanced tools
Comparing version
@@ -0,1 +1,7 @@ | ||
## 1.17.1 (2021-01-08) | ||
### Bug fixes | ||
Fix a regression in `coordsAtPos` when used on an empty line at the end of a code block. | ||
## 1.17.0 (2021-01-07) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-view", | ||
"version": "1.17.0", | ||
"version": "1.17.1", | ||
"description": "ProseMirror's view component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -341,4 +341,5 @@ import {nodeSize, textRange, parentNode} from "./dom" | ||
let target = before.nodeType == 3 ? textRange(before, nodeSize(before) - (supportEmptyRange ? 0 : 1)) | ||
// BR nodes tend to only return the rectangle before them | ||
: before.nodeType == 1 && before.nodeName != "BR" ? before : null | ||
// BR nodes tend to only return the rectangle before them. | ||
// Only use them if they are the last element in their parent | ||
: before.nodeType == 1 && (before.nodeName != "BR" || !before.nextSibling) ? before : null | ||
if (target) return flattenV(singleRect(target, 1), false) | ||
@@ -345,0 +346,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
1494232
0.05%13983
0.02%