Update main.ts

Added checking for hc- id
This commit is contained in:
Anastasia Fedotova 2025-03-05 13:40:55 +04:00 committed by GitHub
parent 23a2526fc4
commit feb08b5d69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,7 +39,7 @@ export default class HTMLCheckboxPlugin extends Plugin {
if (target.localName == "input" &&
(target as HTMLInputElement).type == "checkbox" &&
target.id
target.id && target.id.startsWith("hc-")
) {
e.preventDefault()
@ -116,7 +116,7 @@ export default class HTMLCheckboxPlugin extends Plugin {
let target = e.target as HTMLElement
if (target.localName == "input" &&
(target as HTMLInputElement).type == "checkbox" &&
target.id
target.id && target.id.startsWith("hc-")
) {
const menu = new Menu();