From 7807e3ac0332e4818c31a1b33a8c70578baccd59 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 12 Feb 2022 08:45:04 -0800 Subject: [PATCH] fix: Todo list items not showing as checked on Firefox --- shared/editor/nodes/CheckboxItem.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/editor/nodes/CheckboxItem.ts b/shared/editor/nodes/CheckboxItem.ts index 8724b768b..f7c03ff15 100644 --- a/shared/editor/nodes/CheckboxItem.ts +++ b/shared/editor/nodes/CheckboxItem.ts @@ -36,7 +36,7 @@ export default class CheckboxItem extends Node { const input = document.createElement("span"); input.tabIndex = -1; input.className = "checkbox"; - input.ariaChecked = node.attrs.checked.toString(); + input.setAttribute("aria-checked", node.attrs.checked.toString()); input.setAttribute("role", "checkbox"); input.addEventListener("click", this.handleClick); @@ -75,7 +75,7 @@ export default class CheckboxItem extends Node { if (result) { const transaction = tr.setNodeMarkup(result.inside, undefined, { - checked: event.target.ariaChecked !== "true", + checked: event.target.getAttribute("aria-checked") !== "true", }); view.dispatch(transaction); }