mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
This commit is contained in:
parent
9539bf48b0
commit
1d8cc9d6b5
1 changed files with 2 additions and 1 deletions
|
|
@ -1,13 +1,14 @@
|
|||
import {getEventName, isCtrl, updateHotkeyTip} from "../protyle/util/compatibility";
|
||||
import {setPosition} from "../util/setPosition";
|
||||
import {hasClosestByClassName} from "../protyle/util/hasClosest";
|
||||
import {isMobile} from "../util/functions";
|
||||
|
||||
export class Menu {
|
||||
public element: HTMLElement;
|
||||
|
||||
constructor() {
|
||||
this.element = document.getElementById("commonMenu");
|
||||
this.element.addEventListener("mouseover", (event) => {
|
||||
this.element.addEventListener(isMobile() ? getEventName() : "mouseover", (event) => {
|
||||
const target = event.target as Element;
|
||||
const itemElement = hasClosestByClassName(target, "b3-menu__item");
|
||||
if (!itemElement) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue