From f64c3439f46ab231f67b65359af4884e8bb23bbe Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 20 Nov 2022 22:26:55 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/6653 --- app/src/menus/protyle.ts | 2 +- app/src/protyle/wysiwyg/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index 9fed677a6..15d0d73c3 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -275,7 +275,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => { export const contentMenu = (protyle: IProtyle, nodeElement: Element) => { const range = getEditorRange(nodeElement); window.siyuan.menus.menu.remove(); - if (range.toString() !== "") { + if (range.toString() !== "" || (range.cloneContents().childNodes[0] as HTMLElement)?.classList.contains("emoji")) { window.siyuan.menus.menu.append(new MenuItem({ icon: "iconCopy", accelerator: "⌘C", diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 92e4da4cd..a3ac30463 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -1411,7 +1411,7 @@ export class WYSIWYG { }); this.element.addEventListener("dblclick", (event: MouseEvent & { target: HTMLElement }) => { - if (event.target.tagName === "IMG") { + if (event.target.tagName === "IMG" && !event.target.classList.contains("emoji")) { previewImage((event.target as HTMLImageElement).src, protyle.block.rootID); return; }