Skip to content
This repository was archived by the owner on Oct 4, 2024. It is now read-only.

Commit 5c4a695

Browse files
authored
Don't clear CodeMirror inline styles on setText (#384)
1 parent ef5ef64 commit 5c4a695

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/firepad.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,10 @@ firepad.Firepad = (function(global) {
215215
return this.ace_.getSession().getDocument().setValue(textPieces);
216216
} else {
217217
// HACK: Hide CodeMirror during setText to prevent lots of extra renders.
218-
this.codeMirror_.getWrapperElement().setAttribute('style', 'display: none');
218+
this.codeMirror_.getWrapperElement().style.display = "none";
219219
this.codeMirror_.setValue("");
220220
this.insertText(0, textPieces);
221-
this.codeMirror_.getWrapperElement().setAttribute('style', '');
221+
this.codeMirror_.getWrapperElement().style.display = "";
222222
this.codeMirror_.refresh();
223223
}
224224
this.editorAdapter_.setCursor({position: 0, selectionEnd: 0});

0 commit comments

Comments
 (0)