From 2aefead3f01673c19a6dfe7b1046dd1107862d8d Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 10 Jan 2024 09:17:35 +0800 Subject: [PATCH] :art: --- app/src/protyle/hint/index.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts index 9d3d64ccf..87905910c 100644 --- a/app/src/protyle/hint/index.ts +++ b/app/src/protyle/hint/index.ts @@ -58,15 +58,8 @@ export class Hint { } const btnElement = hasClosestByMatchTag(eventTarget, "BUTTON"); if (btnElement && !btnElement.classList.contains("emojis__item") && !btnElement.classList.contains("emojis__type")) { - if (this.source !== "search") { - this.fill(decodeURIComponent(btnElement.getAttribute("data-value")), protyle, true, isOnlyMeta(event)); - } else { - setTimeout(() => { - this.fill(decodeURIComponent(btnElement.getAttribute("data-value")), protyle, true, isNotCtrl(event)); - }, 148); // 划选引用点击,需先重置 range - } focusByRange(protyle.toolbar.range); - + this.fill(decodeURIComponent(btnElement.getAttribute("data-value")), protyle, true, this.source === "search" ? isNotCtrl(event) : isOnlyMeta(event)); event.preventDefault(); event.stopPropagation(); // https://github.com/siyuan-note/siyuan/issues/3710 return; @@ -558,7 +551,6 @@ ${genHintItemHTML(item)} tempElement.innerText = dynamicTexts[1]; } } - protyle.toolbar.range = range; protyle.toolbar.setInlineMark(protyle, "block-ref", "range", { type: "id", color: `${tempElement.getAttribute("data-id")}${Constants.ZWSP}${tempElement.getAttribute("data-subtype")}${Constants.ZWSP}${tempElement.textContent}`