mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 08:53:41 +08:00
FIX: Inserting link wouldn't clear the text field sometimes
This commit is contained in:
parent
540933dce3
commit
8c48c12498
|
@ -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 New Issue
Block a user