mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Merge pull request #5039 from matrix-org/t3chguy/fix/14684
Fix Firefox composer regression exception
This commit is contained in:
commit
4db0d94fb6
1 changed files with 3 additions and 3 deletions
|
@ -162,10 +162,10 @@ export function renderModel(editor: HTMLDivElement, model: EditorModel) {
|
|||
lines.forEach((parts, i) => {
|
||||
// find first (and remove anything else) div without className
|
||||
// (as browsers insert these in contenteditable) line container
|
||||
let lineContainer = editor.children[i];
|
||||
while (lineContainer && (lineContainer.tagName !== "DIV" || !!lineContainer.className)) {
|
||||
let lineContainer = editor.childNodes[i];
|
||||
while (lineContainer && ((<Element>lineContainer).tagName !== "DIV" || !!(<Element>lineContainer).className)) {
|
||||
editor.removeChild(lineContainer);
|
||||
lineContainer = editor.children[i];
|
||||
lineContainer = editor.childNodes[i];
|
||||
}
|
||||
if (!lineContainer) {
|
||||
lineContainer = document.createElement("div");
|
||||
|
|
Loading…
Reference in a new issue