Skip to content

Commit

Permalink
Editor extra line break bug in firefox part 3
Browse files Browse the repository at this point in the history
  • Loading branch information
mschering committed Feb 11, 2025
1 parent c72ee99 commit 30513ec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions www/views/Extjs3/javascript/form/HtmlEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ Ext.extend(GO.form.HtmlEditor, Ext.form.HtmlEditor, {
}
});

console.warn(h != anchored);
if(h != anchored) {

this.getEditorBody().innerHTML = anchored;
this.restoreCursorPosition();
}else
Expand All @@ -274,9 +276,9 @@ Ext.extend(GO.form.HtmlEditor, Ext.form.HtmlEditor, {
range = sel.getRangeAt(0);

el = doc.createElement("div");
el.innerHTML = "<div style='display:none' id='go-stored-cursor'></div>";
el.innerHTML = "<span style='display:none' id='go-stored-cursor'></span>";
frag = doc.createDocumentFragment();
while ((node = el.firstChildElement)) {
while ((node = el.firstChild)) {
lastNode = frag.appendChild(node);
}
firstNode = frag.firstChild;
Expand Down

0 comments on commit 30513ec

Please sign in to comment.