This commit is contained in:
parent
fe6d68c3e7
commit
4693ee5343
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue