fixed context menu

This commit is contained in:
anareaty 2025-02-13 23:22:18 +04:00
parent 612d002119
commit ccbbf3c9e7
2 changed files with 11 additions and 2 deletions

11
main.ts
View file

@ -104,7 +104,8 @@ export default class HTMLCheckboxPlugin extends Plugin {
/* Add menu for alternative checkboxes */
this.registerDomEvent(window, "mousedown", (e: MouseEvent) => {
this.registerDomEvent(window, "contextmenu", (e: MouseEvent) => {
if (e.button == 2) {
let target = e.target as HTMLElement
if (target.localName == "input" &&
@ -165,6 +166,14 @@ export default class HTMLCheckboxPlugin extends Plugin {
}
}
})
}
onunload() {}

View file

@ -1,7 +1,7 @@
{
"id": "html-checkboxes",
"name": "HTML checkboxes",
"version": "1.0.3",
"version": "1.0.4",
"minAppVersion": "0.15.0",
"description": "Allows to quickly add HTML checkboxes to your notes and makes them clickable.",
"author": "Anareaty",