This commit is contained in:
parent
e796a24c34
commit
694d7bba9a
3 changed files with 13 additions and 11 deletions
|
@ -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) {
|
||||
|
|
|
@ -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 = `<li class="b3-list--empty">${window.siyuan.languages.emptyContent}</li>`;
|
||||
}
|
||||
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 += `<div class="b3-list-item${index === 0 ? " b3-list-item--focus" : ""}">${item.content}</div>`;
|
||||
});
|
||||
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
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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(" "));
|
||||
|
|
Loading…
Add table
Reference in a new issue