mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
DEV: Fix the Function.prototype.on
deprecation (#8205)
https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-on
This commit is contained in:
@ -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