From 78497c40d0e4a760217148ffee4e59b08e6783e7 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 13 Jan 2024 22:36:58 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/9867 --- app/src/protyle/wysiwyg/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 0b5d24f47..33add3079 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -486,11 +486,13 @@ export class WYSIWYG { documentSelf.ondragstart = null; documentSelf.onselectstart = null; documentSelf.onselect = null; - focusBlock(nodeElement); - lastCellElement.insertAdjacentHTML("beforeend", `
`) + if (lastCellElement) { + focusBlock(nodeElement); + lastCellElement.insertAdjacentHTML("beforeend", `
`) + this.preventClick = true; + } return false; }; - this.preventClick = true; event.stopPropagation(); event.preventDefault(); return false;