Skip to content

Commit d7fdc18

Browse files
committed
Fixed firefox bug to display editor
1 parent 7cdb40d commit d7fdc18

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/Editor/Editor.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ class _Editor extends Component {
4646
setTimeout(() => {
4747
this.editor.refresh();
4848
}, 0);
49+
50+
// Terrible hack to force Firefox into displaying the editor:
51+
setTimeout(() => {
52+
this.editor.refresh();
53+
}, 250);
4954
}
5055

5156
componentDidUpdate(prevProps, prevState) {
@@ -129,6 +134,7 @@ class _Editor extends Component {
129134

130135
let options = {
131136
...this.props.options,
137+
defaultValue: ' ',
132138
mode: 'javascript',
133139
viewportMargin : Infinity,
134140
gutters : [GUTTER_ID,'CodeMirror-linenumbers'],

0 commit comments

Comments
 (0)