fix(editor): don't check parent checkbox when child label was clicked
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2023-11-27 13:11:24 +01:00
parent 1cbb93ea9b
commit e770496524
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 8 additions and 1 deletions

View File

@ -546,7 +546,12 @@ function setFocusToEditor(event) {
}
function clickTasklistCheckbox(event) {
// Needs to be a separate function to be able to remove the event listener
event.stopImmediatePropagation()
if (event.target.localName !== 'p') {
return
}
event.target.parentNode.parentNode.firstChild.click()
}
@ -558,6 +563,7 @@ watch(
if (typeof checkboxes === 'undefined' || checkboxes.length === 0) {
return
}
if (editing) {
checkboxes.forEach(check => {
if (check.children.length < 2) {
@ -571,6 +577,7 @@ watch(
return
}
checkboxes.forEach(check => {
if (check.children.length < 2) {
return