mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-25 00:14:07 +01:00
🎨
This commit is contained in:
parent
42896d5c3b
commit
2aefead3f0
1 changed files with 1 additions and 9 deletions
|
|
@ -58,15 +58,8 @@ export class Hint {
|
||||||
}
|
}
|
||||||
const btnElement = hasClosestByMatchTag(eventTarget, "BUTTON");
|
const btnElement = hasClosestByMatchTag(eventTarget, "BUTTON");
|
||||||
if (btnElement && !btnElement.classList.contains("emojis__item") && !btnElement.classList.contains("emojis__type")) {
|
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);
|
focusByRange(protyle.toolbar.range);
|
||||||
|
this.fill(decodeURIComponent(btnElement.getAttribute("data-value")), protyle, true, this.source === "search" ? isNotCtrl(event) : isOnlyMeta(event));
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation(); // https://github.com/siyuan-note/siyuan/issues/3710
|
event.stopPropagation(); // https://github.com/siyuan-note/siyuan/issues/3710
|
||||||
return;
|
return;
|
||||||
|
|
@ -558,7 +551,6 @@ ${genHintItemHTML(item)}
|
||||||
tempElement.innerText = dynamicTexts[1];
|
tempElement.innerText = dynamicTexts[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protyle.toolbar.range = range;
|
|
||||||
protyle.toolbar.setInlineMark(protyle, "block-ref", "range", {
|
protyle.toolbar.setInlineMark(protyle, "block-ref", "range", {
|
||||||
type: "id",
|
type: "id",
|
||||||
color: `${tempElement.getAttribute("data-id")}${Constants.ZWSP}${tempElement.getAttribute("data-subtype")}${Constants.ZWSP}${tempElement.textContent}`
|
color: `${tempElement.getAttribute("data-id")}${Constants.ZWSP}${tempElement.getAttribute("data-subtype")}${Constants.ZWSP}${tempElement.textContent}`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue