diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts index 0ac300963..07a910468 100644 --- a/app/src/protyle/gutter/index.ts +++ b/app/src/protyle/gutter/index.ts @@ -37,6 +37,7 @@ import {transferBlockRef} from "../../menus/block"; import {isMobile} from "../../util/functions"; import {AIActions} from "../../ai/actions"; import {activeBlur} from "../../mobile/util/keyboardToolbar"; +import {hideTooltip} from "../../dialog/tooltip"; export class Gutter { public element: HTMLElement; @@ -52,6 +53,7 @@ export class Gutter { this.element.setAttribute("data-type", "a"); this.element.setAttribute("data-position", "right"); this.element.addEventListener("dragstart", (event: DragEvent & { target: HTMLElement }) => { + hideTooltip(); let selectIds: string[] = [event.target.getAttribute("data-node-id")]; const selectElements = protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"); if (selectElements.length > 0) { diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index 75b5be76a..6fda70775 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -1495,11 +1495,6 @@ export class Toolbar { }); this.subElement.classList.remove("fn__none"); this.subElementCloseCB = undefined; - /// #if !MOBILE - const rangePosition = getSelectionPosition(nodeElement, range); - setPosition(this.subElement, rangePosition.left, rangePosition.top + 18, Constants.SIZE_TOOLBAR_HEIGHT); - (this.subElement.firstElementChild as HTMLElement).style.maxHeight = Math.min(window.innerHeight * 0.8, window.innerHeight - this.subElement.getBoundingClientRect().top) - 16 + "px"; - /// #endif this.element.classList.add("fn__none"); inputElement.select(); fetchPost("/api/search/searchTemplate", { @@ -1522,6 +1517,11 @@ export class Toolbar { html = `
  • ${window.siyuan.languages.emptyContent}
  • `; } this.subElement.querySelector(".b3-list--background").innerHTML = html; + /// #if !MOBILE + const rangePosition = getSelectionPosition(nodeElement, range); + setPosition(this.subElement, rangePosition.left, rangePosition.top + 18, Constants.SIZE_TOOLBAR_HEIGHT); + (this.subElement.firstElementChild as HTMLElement).style.maxHeight = Math.min(window.innerHeight * 0.8, window.innerHeight - this.subElement.getBoundingClientRect().top) - 16 + "px"; + /// #endif }); } @@ -1573,10 +1573,6 @@ export class Toolbar { }); this.subElement.classList.remove("fn__none"); this.subElementCloseCB = undefined; - /// #if !MOBILE - const rangePosition = getSelectionPosition(nodeElement, range); - setPosition(this.subElement, rangePosition.left, rangePosition.top + 18, Constants.SIZE_TOOLBAR_HEIGHT); - /// #endif this.element.classList.add("fn__none"); inputElement.select(); fetchPost("/api/search/searchWidget", { @@ -1587,6 +1583,10 @@ export class Toolbar { html += `
    ${item.content}
    `; }); this.subElement.querySelector(".b3-list--background").innerHTML = html; + /// #if !MOBILE + const rangePosition = getSelectionPosition(nodeElement, range); + setPosition(this.subElement, rangePosition.left, rangePosition.top + 18, Constants.SIZE_TOOLBAR_HEIGHT); + /// #endif }); } diff --git a/app/src/util/pathName.ts b/app/src/util/pathName.ts index a271f14a9..9adf41755 100644 --- a/app/src/util/pathName.ts +++ b/app/src/util/pathName.ts @@ -162,8 +162,8 @@ export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void, } } }); - // 文档树上引用数悬浮层不被遮挡 - dialog.element.style.zIndex = "200"; + // 文档树上引用数悬浮层不被遮挡,搜索指定路径不被搜索遮挡 + dialog.element.style.zIndex = "203"; if (paths && paths.length > 0) { fetchPost("/api/filetree/getHPathsByPaths", {paths}, (response) => { dialog.element.querySelector(".b3-dialog__header .ft__smaller").innerHTML = escapeHtml(response.data.join(" "));