Vanessa 2023-12-01 11:58:56 +08:00
parent d6481711af
commit 45a8c97e9f
2 changed files with 3 additions and 3 deletions

View file

@ -242,7 +242,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
return true;
} else if (target.classList.contains("item") && target.parentElement.classList.contains("layout-tab-bar")) {
if (target.classList.contains("item--focus")) {
openViewMenu({protyle, blockElement, element:target});
openViewMenu({protyle, blockElement, element: target});
} else {
blockElement.removeAttribute("data-render");
avRender(blockElement, protyle, undefined, target.dataset.id);

View file

@ -1372,11 +1372,11 @@ export class WYSIWYG {
const avTabHeaderElement = hasClosestByClassName(target, "item");
if (nodeElement.classList.contains("av") && avTabHeaderElement) {
if (avTabHeaderElement.classList.contains("item--focus")) {
openViewMenu({protyle, blockElement:nodeElement, element:target});
openViewMenu({protyle, blockElement: nodeElement, element: avTabHeaderElement});
} else {
nodeElement.removeAttribute("data-render");
avRender(nodeElement, protyle, () => {
openViewMenu({protyle, blockElement:nodeElement, element:nodeElement.querySelector(".item.item--focus")});
openViewMenu({protyle, blockElement: nodeElement, element: nodeElement.querySelector(".item.item--focus")});
}, avTabHeaderElement.dataset.id);
}
event.stopPropagation();