Vanessa 2025-01-02 22:55:18 +08:00
parent 0aed11045c
commit eda34f2c7e
2 changed files with 11 additions and 0 deletions

View File

@ -48,6 +48,16 @@ export class Tab {
this.headElement.addEventListener("mouseenter", (event) => {
event.stopPropagation();
event.preventDefault();
const dragElement = Array.from(this.headElement.parentElement.childNodes).find((item: HTMLElement) => {
if (item.style?.opacity === "0.1") {
return true;
}
});
if (dragElement) {
hideTooltip();
return;
}
let id = "";
if (this.model instanceof Editor && this.model.editor?.protyle?.block?.rootID) {
id = (this.model as Editor).editor.protyle.block.rootID;

View File

@ -219,6 +219,7 @@ export class Wnd {
}
return;
}
it.classList.remove("layout-tab-bars--drag");
if (!newTabHeaderElement.isSameNode(oldTabHeaderElement) &&
((oldTabHeaderElement.classList.contains("item--pin") && newTabHeaderElement.classList.contains("item--pin")) ||
(!oldTabHeaderElement.classList.contains("item--pin") && !newTabHeaderElement.classList.contains("item--pin")))) {