mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 01:20:12 +01:00
This commit is contained in:
parent
7b6b50d584
commit
0c7e5e8667
1 changed files with 5 additions and 1 deletions
|
|
@ -498,7 +498,11 @@ export const globalShortcut = () => {
|
|||
|
||||
window.addEventListener("click", (event: MouseEvent & { target: HTMLElement }) => {
|
||||
if (!window.siyuan.menus.menu.element.contains(event.target) && !hasClosestByAttribute(event.target, "data-menu", "true")) {
|
||||
window.siyuan.menus.menu.remove();
|
||||
if (getSelection().rangeCount > 0 && window.siyuan.menus.menu.element.contains(getSelection().getRangeAt(0).startContainer)) {
|
||||
// https://ld246.com/article/1654567749834/comment/1654589171218#comments
|
||||
} else {
|
||||
window.siyuan.menus.menu.remove();
|
||||
}
|
||||
}
|
||||
if (!hasClosestByClassName(event.target, "pdf__outer")) {
|
||||
document.querySelectorAll(".pdf__util").forEach(item => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue