Skip to content

Commit

Permalink
🐛 fix #1491
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Oct 31, 2023
1 parent e6abc04 commit e619983
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ts/toolbar/Fullscreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class Fullscreen extends MenuItem {
}

public _bindEvent(vditor: IVditor, menuItem: IMenuItem) {
this.element.children[0].addEventListener(getEventName(), function(event) {
this.element.children[0].addEventListener(getEventName(), function (event) {
event.preventDefault();
if (vditor.element.className.includes("vditor--fullscreen")) {
if (!menuItem.level) {
Expand All @@ -22,6 +22,11 @@ export class Fullscreen extends MenuItem {
const svgElement = vditor.toolbar.elements[key].firstChild as HTMLElement;
if (svgElement) {
svgElement.className = svgElement.className.replace("__s", "__n");
vditor.options.toolbar.forEach(item => {
if (typeof item !== "string" && item.tipPosition && item.name === svgElement.dataset.type) {
svgElement.className = `vditor-tooltipped vditor-tooltipped__${item.tipPosition}`;
}
})
}
});
if (vditor.counter) {
Expand Down

0 comments on commit e619983

Please sign in to comment.