mirror of
https://github.com/anareaty/html-checkboxes.git
synced 2026-07-22 05:37:43 +00:00
fixed context menu
This commit is contained in:
parent
612d002119
commit
ccbbf3c9e7
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 */
|
/* Add menu for alternative checkboxes */
|
||||||
|
|
||||||
this.registerDomEvent(window, "mousedown", (e: MouseEvent) => {
|
|
||||||
|
this.registerDomEvent(window, "contextmenu", (e: MouseEvent) => {
|
||||||
if (e.button == 2) {
|
if (e.button == 2) {
|
||||||
let target = e.target as HTMLElement
|
let target = e.target as HTMLElement
|
||||||
if (target.localName == "input" &&
|
if (target.localName == "input" &&
|
||||||
|
|
@ -165,6 +166,14 @@ export default class HTMLCheckboxPlugin extends Plugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onunload() {}
|
onunload() {}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "html-checkboxes",
|
"id": "html-checkboxes",
|
||||||
"name": "HTML checkboxes",
|
"name": "HTML checkboxes",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"minAppVersion": "0.15.0",
|
"minAppVersion": "0.15.0",
|
||||||
"description": "Allows to quickly add HTML checkboxes to your notes and makes them clickable.",
|
"description": "Allows to quickly add HTML checkboxes to your notes and makes them clickable.",
|
||||||
"author": "Anareaty",
|
"author": "Anareaty",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue