mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
commit
1851c8d918
1 changed files with 9 additions and 0 deletions
|
@ -26,8 +26,15 @@ export default Ember.Component.extend({
|
||||||
this._editor.destroy();
|
this._editor.destroy();
|
||||||
this._editor = null;
|
this._editor = null;
|
||||||
}
|
}
|
||||||
|
this.appEvents.off('ace:resize', this, this.resize);
|
||||||
}.on('willDestroyElement'),
|
}.on('willDestroyElement'),
|
||||||
|
|
||||||
|
resize() {
|
||||||
|
if (this._editor) {
|
||||||
|
this._editor.resize();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
_initEditor: function() {
|
_initEditor: function() {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
|
@ -43,9 +50,11 @@ export default Ember.Component.extend({
|
||||||
self.set('content', editor.getSession().getValue());
|
self.set('content', editor.getSession().getValue());
|
||||||
self._skipContentChangeEvent = false;
|
self._skipContentChangeEvent = false;
|
||||||
});
|
});
|
||||||
|
editor.$blockScrolling = Infinity;
|
||||||
|
|
||||||
self.$().data('editor', editor);
|
self.$().data('editor', editor);
|
||||||
self._editor = editor;
|
self._editor = editor;
|
||||||
|
self.appEvents.on('ace:resize', self, self.resize);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue