mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
This commit is contained in:
parent
b0d950efd4
commit
d4e23f81fc
1 changed files with 9 additions and 0 deletions
|
|
@ -184,6 +184,15 @@ export const isEndOfBlock = (range: Range) => {
|
||||||
let nextSibling = range.endContainer;
|
let nextSibling = range.endContainer;
|
||||||
if (range.endContainer.nodeType !== 3) {
|
if (range.endContainer.nodeType !== 3) {
|
||||||
nextSibling = range.endContainer.childNodes[range.endOffset];
|
nextSibling = range.endContainer.childNodes[range.endOffset];
|
||||||
|
if (!nextSibling) {
|
||||||
|
// https://github.com/siyuan-note/siyuan/issues/16214
|
||||||
|
if (range.endContainer.parentElement.getAttribute("spellcheck")) {
|
||||||
|
nextSibling = range.endContainer;
|
||||||
|
}
|
||||||
|
} else if (nextSibling.nodeType === 3 && !range.endContainer.childNodes[range.endOffset + 1]) {
|
||||||
|
// https://github.com/siyuan-note/siyuan/issues/16227
|
||||||
|
return nextSibling.textContent === Constants.ZWSP || nextSibling.textContent === "\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (nextSibling) {
|
while (nextSibling) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue