fix(editor): don't check parent checkbox when child label was clicked
This commit is contained in:
parent
1cbb93ea9b
commit
e770496524
@ -546,7 +546,12 @@ function setFocusToEditor(event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function clickTasklistCheckbox(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()
|
event.target.parentNode.parentNode.firstChild.click()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,6 +563,7 @@ watch(
|
|||||||
if (typeof checkboxes === 'undefined' || checkboxes.length === 0) {
|
if (typeof checkboxes === 'undefined' || checkboxes.length === 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (editing) {
|
if (editing) {
|
||||||
checkboxes.forEach(check => {
|
checkboxes.forEach(check => {
|
||||||
if (check.children.length < 2) {
|
if (check.children.length < 2) {
|
||||||
@ -571,6 +577,7 @@ watch(
|
|||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
checkboxes.forEach(check => {
|
checkboxes.forEach(check => {
|
||||||
if (check.children.length < 2) {
|
if (check.children.length < 2) {
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user