mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-05 15:11:48 +01:00
This commit is contained in:
parent
592e5f4cd8
commit
34171769d7
3 changed files with 9 additions and 4 deletions
|
|
@ -117,6 +117,7 @@ ${this.position === "Top" ? ("top:" + (this.element.offsetHeight + document.getE
|
|||
} else {
|
||||
target.setAttribute("aria-label", window.siyuan.languages.unpin);
|
||||
this.layout.element.style.opacity = "";
|
||||
this.layout.element.style.transition = "var(--b3-width-transition)";
|
||||
if (hasActive) {
|
||||
this.resizeElement.classList.remove("fn__none");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,10 +198,14 @@ export const getSelectionPosition = (nodeElement: Element, range?: Range) => {
|
|||
if (!parentElement) {
|
||||
parentElement = range.startContainer.childNodes[range.startOffset - 1] as HTMLElement;
|
||||
}
|
||||
while (!parentElement.getClientRects || (parentElement.getClientRects && parentElement.getClientRects().length === 0)) {
|
||||
parentElement = parentElement.parentElement;
|
||||
if (!parentElement) {
|
||||
cursorRect = range.getBoundingClientRect();
|
||||
} else {
|
||||
while (!parentElement.getClientRects || (parentElement.getClientRects && parentElement.getClientRects().length === 0)) {
|
||||
parentElement = parentElement.parentElement;
|
||||
}
|
||||
cursorRect = parentElement.getClientRects()[0];
|
||||
}
|
||||
cursorRect = parentElement.getClientRects()[0];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ export const globalShortcut = () => {
|
|||
});
|
||||
window.siyuan.hideBreadcrumb = false;
|
||||
}
|
||||
if (!isWindow() && !hasClosestByClassName(event.target, "b3-dialog")) {
|
||||
if (!isWindow() && !hasClosestByClassName(event.target, "b3-dialog") && !hasClosestByClassName(event.target, "b3-menu")) {
|
||||
if (event.clientX < 43) {
|
||||
if (!window.siyuan.layout.leftDock.pin && window.siyuan.layout.leftDock.layout.element.clientWidth > 0) {
|
||||
if (event.clientY > document.getElementById("toolbar").clientHeight + document.getElementById("dockTop").clientHeight &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue