File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -305,7 +305,15 @@ export class Toolbar {
305
305
// https://github.com/siyuan-note/siyuan/issues/14869
306
306
( this . range . startOffset === 0 && this . range . startContainer . previousSibling ?. nodeType === 3 &&
307
307
this . range . startContainer . previousSibling . parentElement . isSameNode ( this . range . startContainer . parentElement ) )
308
- ) && this . range . endOffset !== this . range . endContainer . textContent . length &&
308
+ ) && (
309
+ this . range . endOffset !== this . range . endContainer . textContent . length ||
310
+ // https://github.com/siyuan-note/siyuan/issues/14869#issuecomment-2911553387
311
+ (
312
+ this . range . endOffset === this . range . endContainer . textContent . length &&
313
+ this . range . endContainer . nextSibling ?. nodeType === 3 &&
314
+ this . range . endContainer . nextSibling . parentElement . isSameNode ( this . range . endContainer . parentElement )
315
+ )
316
+ ) &&
309
317
! ( this . range . startOffset === 1 && this . range . startContainer . textContent . startsWith ( Constants . ZWSP ) ) ) {
310
318
// 切割元素
311
319
const parentElement = this . range . startContainer . parentElement ;
You can’t perform that action at this time.
0 commit comments