mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-18 10:00:48 +08:00
This commit is contained in:
parent
9d9e0c07e8
commit
d6dda080a8
@ -875,7 +875,14 @@ ${unicode2Emoji(item.icon || Constants.SIYUAN_IMAGE_FILE, false, "b3-list-item__
|
|||||||
dialog.element.querySelector("input").focus();
|
dialog.element.querySelector("input").focus();
|
||||||
dialog.element.setAttribute("data-key", window.siyuan.config.keymap.general.recentDocs.custom)
|
dialog.element.setAttribute("data-key", window.siyuan.config.keymap.general.recentDocs.custom)
|
||||||
dialog.element.addEventListener("click", (event) => {
|
dialog.element.addEventListener("click", (event) => {
|
||||||
|
const liElement = hasClosestByClassName(event.target as HTMLElement, "b3-list-item");
|
||||||
|
if (liElement) {
|
||||||
|
dialog.element.querySelector(".b3-list-item--focus").classList.remove("b3-list-item--focus");
|
||||||
|
liElement.classList.add("b3-list-item--focus");
|
||||||
window.dispatchEvent(new KeyboardEvent("keydown", {key: "Enter"}))
|
window.dispatchEvent(new KeyboardEvent("keydown", {key: "Enter"}))
|
||||||
|
event.stopPropagation();
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user