We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c6671b commit c03e441Copy full SHA for c03e441
resources/js/wysiwyg/lexical/list/LexicalListNode.ts
@@ -332,7 +332,19 @@ function isDomChecklist(domNode: HTMLElement) {
332
}
333
// if children are checklist items, the node is a checklist ul. Applicable for googledoc checklist pasting.
334
for (const child of domNode.childNodes) {
335
- if (isHTMLElement(child) && child.hasAttribute('aria-checked')) {
+ if (!isHTMLElement(child)) {
336
+ continue;
337
+ }
338
+
339
+ if (child.hasAttribute('aria-checked')) {
340
+ return true;
341
342
343
+ if (child.classList.contains('task-list-item')) {
344
345
346
347
+ if (child.firstElementChild && child.firstElementChild.matches('input[type="checkbox"]')) {
348
return true;
349
350
0 commit comments