DEV: Upgrades to Ember 3.10 (#7871)

Co-Authored-By: majakomel <maja.komel@gmail.com>
This commit is contained in:
Joffrey JAFFEUX
2019-07-16 12:45:15 +02:00
committed by GitHub
parent e2fa5704e9
commit b3eb67976d
78 changed files with 332 additions and 263 deletions

View File

@ -62,7 +62,7 @@ export default Ember.Component.extend({
this.setProperties({ ip_address: "", formSubmitted: false });
this.action(ScreenedIpAddress.create(result.screened_ip_address));
Ember.run.schedule("afterRender", () =>
this.$(".ip-address-input").focus()
this.element.querySelector(".ip-address-input").focus()
);
})
.catch(e => {
@ -73,7 +73,9 @@ export default Ember.Component.extend({
error: e.jqXHR.responseJSON.errors.join(". ")
})
: I18n.t("generic_error");
bootbox.alert(msg, () => this.$(".ip-address-input").focus());
bootbox.alert(msg, () =>
this.element.querySelector(".ip-address-input").focus()
);
});
}
}
@ -82,7 +84,7 @@ export default Ember.Component.extend({
@on("didInsertElement")
_init() {
Ember.run.schedule("afterRender", () => {
this.$(".ip-address-input").keydown(e => {
$(this.element.querySelector(".ip-address-input")).keydown(e => {
if (e.keyCode === 13) {
this.send("submit");
}