This commit is contained in:
Vanessa 2022-09-23 22:00:27 +08:00
parent fe6d68c3e7
commit 4693ee5343

View file

@ -104,7 +104,7 @@ export const fontMenu = (protyle: IProtyle) => {
let target = event.target as HTMLElement;
while (target && !target.isEqualNode(element)) {
if (target.tagName === "BUTTON") {
fontEvent(protyle, target.getAttribute("data-type"), target.style.backgroundColor);
fontEvent(protyle, target.getAttribute("data-type"), target.style.backgroundColor || target.textContent);
break;
}
target = target.parentElement;