mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-10 22:52:34 +01:00
This commit is contained in:
parent
4928e8e2fb
commit
44d3db32e6
3 changed files with 34 additions and 4 deletions
|
|
@ -21,6 +21,18 @@ export const globalClick = (event: MouseEvent & { target: HTMLElement }) => {
|
|||
if (!hasClosestByClassName(event.target, "pdf__outer")) {
|
||||
hideAllElements(["pdfutil"]);
|
||||
}
|
||||
// dock float 时,点击空白处,隐藏 dock。场景:文档树上重命名后
|
||||
if (!isWindow() && window.siyuan.layout.leftDock &&
|
||||
!hasClosestByClassName(event.target, "b3-dialog--open", true) &&
|
||||
!hasClosestByClassName(event.target, "b3-menu") &&
|
||||
!hasClosestByClassName(event.target, "block__popover") &&
|
||||
!hasClosestByClassName(event.target, "dock") &&
|
||||
!hasClosestByClassName(event.target, "layout--float", true)
|
||||
) {
|
||||
window.siyuan.layout.bottomDock.hideDock();
|
||||
window.siyuan.layout.leftDock.hideDock();
|
||||
window.siyuan.layout.rightDock.hideDock();
|
||||
}
|
||||
|
||||
const copyElement = hasTopClosestByClassName(event.target, "protyle-action__copy");
|
||||
if (copyElement) {
|
||||
|
|
|
|||
|
|
@ -47,10 +47,7 @@ export const windowMouseMove = (event: MouseEvent & { target: HTMLElement }, mou
|
|||
if (!mouseIsEnter &&
|
||||
event.buttons === 0 && // 鼠标按键被按下时不触发
|
||||
window.siyuan.layout.bottomDock &&
|
||||
!isWindow() &&
|
||||
!hasClosestByClassName(event.target, "b3-dialog", true) &&
|
||||
!hasClosestByClassName(event.target, "block__popover", true) &&
|
||||
!hasClosestByClassName(event.target, "b3-menu")) {
|
||||
!isWindow()) {
|
||||
if (event.clientX < 43) {
|
||||
if (!window.siyuan.layout.leftDock.pin && window.siyuan.layout.leftDock.layout.element.clientWidth > 0 &&
|
||||
// 隐藏停靠栏会导致点击两侧内容触发浮动面板弹出,因此需减小鼠标范围
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue