mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
Revert "Revert Ember.run refactors"
This reverts commit fcb1ca52f96bdff1a49d558a4ffb18107d8334de.
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { schedule } from "@ember/runloop";
|
||||
import Component from "@ember/component";
|
||||
import WatchedWord from "admin/models/watched-word";
|
||||
import {
|
||||
@ -64,7 +65,7 @@ export default Component.extend({
|
||||
message: I18n.t("admin.watched_words.form.success")
|
||||
});
|
||||
this.action(WatchedWord.create(result));
|
||||
Ember.run.schedule("afterRender", () =>
|
||||
schedule("afterRender", () =>
|
||||
this.element.querySelector(".watched-word-input").focus()
|
||||
);
|
||||
})
|
||||
@ -86,7 +87,7 @@ export default Component.extend({
|
||||
|
||||
@on("didInsertElement")
|
||||
_init() {
|
||||
Ember.run.schedule("afterRender", () => {
|
||||
schedule("afterRender", () => {
|
||||
$(this.element.querySelector(".watched-word-input")).keydown(e => {
|
||||
if (e.keyCode === 13) {
|
||||
this.send("submit");
|
||||
|
Reference in New Issue
Block a user