mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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) {
|
if (key.keyCode === 27) {
|
||||||
this.send('cancel');
|
this.send('cancel');
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
if (key.keyCode === 13) {
|
if (key.keyCode === 13) {
|
||||||
this.send('ok');
|
this.send('ok');
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -412,7 +412,7 @@ export default Ember.Component.extend({
|
|||||||
const insert = `${sel.pre}${text}`;
|
const insert = `${sel.pre}${text}`;
|
||||||
this.set('value', `${insert}${sel.post}`);
|
this.set('value', `${insert}${sel.post}`);
|
||||||
this._selectText(insert.length, 0);
|
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: {
|
actions: {
|
||||||
|
Loading…
Reference in New Issue
Block a user