fix: edit lists crashing and list rendering issue in Firefox (#2920)

* one liner fix editor

* fix firefox rendering lists

* moved fixes

* moved fixes per ajbura
This commit is contained in:
Shea 2026-05-03 15:15:08 +03:00 committed by GitHub
commit 341fedd932
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View file

@ -157,10 +157,12 @@ const getInlineElement = (node: ChildNode, processText: ProcessTextCallback): In
return children;
}
return node.childNodes.flatMap((child) => getInlineElement(child, processText));
const children = node.childNodes.flatMap((child) => getInlineElement(child, processText));
if (children.length === 0) return [{ text: '' }];
return children;
}
return [];
return [{ text: '' }];
};
const parseBlockquoteNode = (

View file

@ -129,3 +129,9 @@ textarea {
audio:not([controls]) {
display: none !important;
}
/* Fix Firefox rendering lists that have empty items with those items collapsed in on eachother */
li p::before {
content: '';
display: inline-block;
}