mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-17 06:05:29 +01:00
This commit is contained in:
parent
f7352acc45
commit
54d00a4081
5 changed files with 32 additions and 25 deletions
|
|
@ -85,14 +85,10 @@ const switchDialogEvent = (event: MouseEvent, switchDialog: Dialog) => {
|
|||
export const globalShortcut = () => {
|
||||
window.addEventListener("mousemove", (event) => {
|
||||
if (window.siyuan.hideBreadcrumb) {
|
||||
getAllModels().editor.forEach(item => {
|
||||
item.editor.protyle.breadcrumb.show();
|
||||
});
|
||||
window.siyuan.blockPanels.forEach(item => {
|
||||
item.editors.forEach(edit => {
|
||||
edit.protyle.breadcrumb.show();
|
||||
});
|
||||
});
|
||||
document.querySelectorAll(".protyle-breadcrumb__bar--hide").forEach(item => {
|
||||
item.classList.remove("protyle-breadcrumb__bar--hide")
|
||||
})
|
||||
window.siyuan.hideBreadcrumb = false;
|
||||
}
|
||||
|
||||
const eventPath0 = event.composedPath()[0] as HTMLElement;
|
||||
|
|
@ -540,6 +536,11 @@ export const globalShortcut = () => {
|
|||
}
|
||||
if (matchHotKey(window.siyuan.config.keymap.general.riffCard.custom, event)) {
|
||||
openCard();
|
||||
if (target.classList.contains("protyle-wysiwyg") ||
|
||||
target.classList.contains("protyle-title__input") ||
|
||||
target.tagName === "INPUT" || target.tagName === "TEXTAREA") {
|
||||
target.blur();
|
||||
}
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue