js/lcn/classes.js: link toggle label to checkbox

This commit is contained in:
Jon 2024-02-26 18:12:57 +00:00
parent d9a2cd78e0
commit e6ef9d0d83
No known key found for this signature in database
GPG Key ID: 0175F5C9B8E9F984
1 changed files with 3 additions and 0 deletions

View File

@ -401,7 +401,10 @@ globalThis.LCNToggleSetting = class LCNToggleSetting extends LCNSetting {
const div = document.createElement("div")
const chk = document.createElement("input")
const txt = document.createElement("label")
const id = `${this.#id}_input`
txt.for = id
txt.innerText = this.getLabel()
chk.id = id
chk.type = "checkbox"
chk.checked = this.getValue()
chk.addEventListener("click", e => {