This commit is contained in:
parent
6cfa8e6cbe
commit
1d4380bb75
1 changed files with 11 additions and 0 deletions
|
@ -853,8 +853,19 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
let nextSibling = hasNextSibling(range.startContainer) as Element;
|
||||
if (nextSibling) {
|
||||
if (nextSibling.nodeType === 3 && nextSibling.textContent === Constants.ZWSP) {
|
||||
if (!nextSibling.nextSibling) {
|
||||
// https://github.com/siyuan-note/siyuan/issues/13524
|
||||
const nextBlockElement = getNextBlock(nodeElement)
|
||||
if (nextBlockElement) {
|
||||
removeBlock(protyle, nextBlockElement, range, "remove");
|
||||
}
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
nextSibling = nextSibling.nextSibling as Element;
|
||||
}
|
||||
|
||||
if (nextSibling.nodeType === 1 && nextSibling.classList.contains("img")) {
|
||||
// 光标需在图片前 https://github.com/siyuan-note/siyuan/issues/12452
|
||||
const textPosition = getSelectionOffset(range.startContainer, protyle.wysiwyg.element, range);
|
||||
|
|
Loading…
Add table
Reference in a new issue