mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-11 09:44:21 +01:00
This commit is contained in:
parent
593959312d
commit
22c46bbc6b
10 changed files with 283 additions and 118 deletions
|
|
@ -874,7 +874,8 @@ export const globalShortcut = (app: App) => {
|
|||
|
||||
window.addEventListener("click", (event: MouseEvent & { target: HTMLElement }) => {
|
||||
if (!window.siyuan.menus.menu.element.contains(event.target) && !hasClosestByAttribute(event.target, "data-menu", "true")) {
|
||||
if (getSelection().rangeCount > 0 && window.siyuan.menus.menu.element.contains(getSelection().getRangeAt(0).startContainer)) {
|
||||
if (getSelection().rangeCount > 0 && window.siyuan.menus.menu.element.contains(getSelection().getRangeAt(0).startContainer) &&
|
||||
window.siyuan.menus.menu.element.contains(document.activeElement)) {
|
||||
// https://ld246.com/article/1654567749834/comment/1654589171218#comments
|
||||
} else {
|
||||
window.siyuan.menus.menu.remove();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue