prosemirror-view
Advanced tools
Comparing version
@@ -0,1 +1,7 @@ | ||
## 1.16.3 (2020-11-23) | ||
### Bug fixes | ||
Fix an issue where pressing enter at the start of a line in a code block would leave the visible cursor in the wrong place on Firefox. | ||
## 1.16.2 (2020-11-18) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-view", | ||
"version": "1.16.2", | ||
"version": "1.16.3", | ||
"description": "ProseMirror's view component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -361,4 +361,8 @@ import {DOMSerializer, Fragment, Mark} from "prosemirror-model" | ||
if ((browser.gecko || browser.safari) && anchor == head) { | ||
let prev = anchorDOM.node.childNodes[anchorDOM.offset - 1] | ||
brKludge = prev && (prev.nodeName == "BR" || prev.contentEditable == "false") | ||
if (anchorDOM.node.nodeType == 3) { | ||
brKludge = anchorDOM.offset && anchorDOM.node.nodeValue[anchorDOM.offset - 1] == "\n" | ||
} else { | ||
let prev = anchorDOM.node.childNodes[anchorDOM.offset - 1] | ||
brKludge = prev && (prev.nodeName == "BR" || prev.contentEditable == "false") | ||
} | ||
} | ||
@@ -365,0 +369,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
1484180
0.09%13930
0.09%