mirror of
https://github.com/anareaty/html-checkboxes.git
synced 2026-07-22 12:00:30 +00:00
fixed context menu
This commit is contained in:
parent
612d002119
commit
7094190895
2 changed files with 11 additions and 2 deletions
11
main.ts
11
main.ts
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue