mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
Revert Ember.run refactors
This reverts commit 5ca60fcb6b592524086f98279d3e4fd949598343.
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
import { schedule } from "@ember/runloop";
|
||||
import Component from "@ember/component";
|
||||
/**
|
||||
A form to create an IP address that will be blocked or whitelisted.
|
||||
@ -63,7 +62,7 @@ export default Component.extend({
|
||||
.then(result => {
|
||||
this.setProperties({ ip_address: "", formSubmitted: false });
|
||||
this.action(ScreenedIpAddress.create(result.screened_ip_address));
|
||||
schedule("afterRender", () =>
|
||||
Ember.run.schedule("afterRender", () =>
|
||||
this.element.querySelector(".ip-address-input").focus()
|
||||
);
|
||||
})
|
||||
@ -85,7 +84,7 @@ export default Component.extend({
|
||||
|
||||
@on("didInsertElement")
|
||||
_init() {
|
||||
schedule("afterRender", () => {
|
||||
Ember.run.schedule("afterRender", () => {
|
||||
$(this.element.querySelector(".ip-address-input")).keydown(e => {
|
||||
if (e.keyCode === 13) {
|
||||
this.send("submit");
|
||||
|
Reference in New Issue
Block a user