mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-11 09:44:21 +01:00
This commit is contained in:
parent
474718e5ae
commit
fe6e9c68fc
4 changed files with 34 additions and 12 deletions
|
|
@ -18,7 +18,7 @@ import {setEditMode} from "../protyle/util/setEditMode";
|
|||
import {rename} from "../editor/rename";
|
||||
import {Files} from "../layout/dock/Files";
|
||||
import {newDailyNote} from "./mount";
|
||||
import {hideElements} from "../protyle/ui/hideElements";
|
||||
import {hideAllElements, hideElements} from "../protyle/ui/hideElements";
|
||||
import {fetchPost} from "./fetch";
|
||||
import {goBack, goForward} from "./backForward";
|
||||
import {onGet} from "../protyle/util/onGet";
|
||||
|
|
@ -825,6 +825,13 @@ export const globalShortcut = () => {
|
|||
window.siyuan.menus.menu.remove();
|
||||
}
|
||||
}
|
||||
// protyle.toolbar 点击空白处时进行隐藏
|
||||
if (!hasClosestByClassName(event.target, "protyle-toolbar")) {
|
||||
hideAllElements(["toolbar"])
|
||||
}
|
||||
if (!hasClosestByClassName(event.target, "pdf__outer")) {
|
||||
hideAllElements(["pdfutil"])
|
||||
}
|
||||
// dock float 时,点击空白处,隐藏 dock
|
||||
const floatDockLayoutElement = hasClosestByClassName(event.target, "layout--float", true);
|
||||
if (floatDockLayoutElement) {
|
||||
|
|
@ -846,11 +853,6 @@ export const globalShortcut = () => {
|
|||
window.siyuan.layout.leftDock.hideDock();
|
||||
window.siyuan.layout.rightDock.hideDock();
|
||||
}
|
||||
if (!hasClosestByClassName(event.target, "pdf__outer")) {
|
||||
document.querySelectorAll(".pdf__util").forEach(item => {
|
||||
item.classList.add("fn__none");
|
||||
});
|
||||
}
|
||||
const copyElement = hasTopClosestByClassName(event.target, "protyle-action__copy");
|
||||
if (copyElement) {
|
||||
writeText(copyElement.parentElement.nextElementSibling.textContent.trimEnd());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue