This commit is contained in:
Vanessa 2023-02-02 18:26:15 +08:00
parent b93945faf9
commit 2d0e35c120
2 changed files with 58 additions and 84 deletions

View file

@ -5,6 +5,7 @@ import {isMobile} from "../util/functions";
export class Menu {
public element: HTMLElement;
public removeCB: () => void;
private wheelEvent: string;
constructor() {
@ -64,6 +65,10 @@ export class Menu {
}
public remove() {
if (window.siyuan.menus.menu.removeCB) {
window.siyuan.menus.menu.removeCB();
window.siyuan.menus.menu.removeCB = undefined;
}
if (isMobile()) {
window.removeEventListener("touchmove", this.preventDefault, false);
} else {