fix: Todo list items not showing as checked on Firefox
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user