mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: Inserting link wouldn't clear the text field sometimes
This commit is contained in:
parent
540933dce3
commit
8c48c12498
2 changed files with 3 additions and 1 deletions
|
@ -29,9 +29,11 @@ export default Ember.Component.extend({
|
|||
|
||||
if (key.keyCode === 27) {
|
||||
this.send('cancel');
|
||||
return false;
|
||||
}
|
||||
if (key.keyCode === 13) {
|
||||
this.send('ok');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -412,7 +412,7 @@ export default Ember.Component.extend({
|
|||
const insert = `${sel.pre}${text}`;
|
||||
this.set('value', `${insert}${sel.post}`);
|
||||
this._selectText(insert.length, 0);
|
||||
Ember.run.once("afterRender", () => { $("textarea.d-editor-input").focus(); } );
|
||||
Ember.run.scheduleOnce("afterRender", () => this.$("textarea.d-editor-input").focus());
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
|
Loading…
Reference in a new issue