DEV: Fix the Function.prototype.on deprecation (#8205)
https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-on
This commit is contained in:
@@ -48,7 +48,7 @@ export default Ember.Component.extend({
|
||||
}
|
||||
},
|
||||
|
||||
_destroyEditor: function() {
|
||||
_destroyEditor: Ember.on("willDestroyElement", function() {
|
||||
if (this._editor) {
|
||||
this._editor.destroy();
|
||||
this._editor = null;
|
||||
@@ -59,7 +59,7 @@ export default Ember.Component.extend({
|
||||
}
|
||||
|
||||
$(window).off("ace:resize");
|
||||
}.on("willDestroyElement"),
|
||||
}),
|
||||
|
||||
resize() {
|
||||
if (this._editor) {
|
||||
|
||||
@@ -89,18 +89,18 @@ export default Ember.Mixin.create({
|
||||
return settingDefault !== bufferedValue;
|
||||
},
|
||||
|
||||
_watchEnterKey: function() {
|
||||
_watchEnterKey: Ember.on("didInsertElement", function() {
|
||||
$(this.element).on("keydown.setting-enter", ".input-setting-string", e => {
|
||||
if (e.keyCode === 13) {
|
||||
// enter key
|
||||
this.send("save");
|
||||
}
|
||||
});
|
||||
}.on("didInsertElement"),
|
||||
}),
|
||||
|
||||
_removeBindings: function() {
|
||||
_removeBindings: Ember.on("willDestroyElement", function() {
|
||||
$(this.element).off("keydown.setting-enter");
|
||||
}.on("willDestroyElement"),
|
||||
}),
|
||||
|
||||
_save() {
|
||||
Ember.warn("You should define a `_save` method", {
|
||||
|
||||
Reference in New Issue
Block a user