mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
This commit is contained in:
parent
62e35b5c52
commit
dc2691d6a9
3 changed files with 2 additions and 3 deletions
|
|
@ -332,7 +332,6 @@ export class Wnd {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (targetWndElement.contains(document.querySelector(`[data-id="${tabId}"]`))) {
|
if (targetWndElement.contains(document.querySelector(`[data-id="${tabId}"]`))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ export const hasClosestByClassName = (element: Node, className: string, top = fa
|
||||||
let e = element as HTMLElement;
|
let e = element as HTMLElement;
|
||||||
let isClosest = false;
|
let isClosest = false;
|
||||||
while (e && !isClosest && (top ? e.tagName !== "BODY" : !e.classList.contains("protyle-wysiwyg"))) {
|
while (e && !isClosest && (top ? e.tagName !== "BODY" : !e.classList.contains("protyle-wysiwyg"))) {
|
||||||
if (e.classList.contains(className)) {
|
if (e.classList?.contains(className)) {
|
||||||
isClosest = true;
|
isClosest = true;
|
||||||
} else {
|
} else {
|
||||||
e = e.parentElement;
|
e = e.parentElement;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ export const setTabPosition = () => {
|
||||||
const headerElement = item.headersElement.parentElement;
|
const headerElement = item.headersElement.parentElement;
|
||||||
const rect = headerElement.getBoundingClientRect()
|
const rect = headerElement.getBoundingClientRect()
|
||||||
const dragElement = headerElement.querySelector('.item--readonly .fn__flex-1') as HTMLElement
|
const dragElement = headerElement.querySelector('.item--readonly .fn__flex-1') as HTMLElement
|
||||||
if (rect.top === 0) {
|
if (rect.top <= 0) {
|
||||||
dragElement.style.height = dragElement.parentElement.clientHeight + "px"
|
dragElement.style.height = dragElement.parentElement.clientHeight + "px"
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
dragElement.style.WebkitAppRegion = "drag";
|
dragElement.style.WebkitAppRegion = "drag";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue