Skip to content

Commit

Permalink
Merge pull request #493 from SergeAstapov/delete-first-responder-inpu…
Browse files Browse the repository at this point in the history
…ts-initializer

[Breaking] Delete deprecated first-responder-inputs-initializer
  • Loading branch information
lukemelia authored Nov 19, 2021
2 parents 0db6a37 + 112e2fc commit 1a21943
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 52 deletions.
1 change: 0 additions & 1 deletion addon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@ export {
export { keyDown, keyUp, keyPress } from 'ember-keyboard/listeners/key-events';
export { click, mouseDown, mouseUp } from 'ember-keyboard/listeners/mouse-events';
export { touchStart, touchEnd } from 'ember-keyboard/listeners/touch-events';
export { initialize } from 'ember-keyboard/initializers/ember-keyboard-first-responder-inputs'; // Remove in 7.0
export { triggerKeyDown, triggerKeyPress, triggerKeyUp } from 'ember-keyboard/utils/trigger-event';

47 changes: 0 additions & 47 deletions addon/initializers/ember-keyboard-first-responder-inputs.js

This file was deleted.

1 change: 0 additions & 1 deletion app/initializers/ember-keyboard-first-responder-inputs.js

This file was deleted.

17 changes: 16 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
'use strict';

module.exports = {
name: require('./package').name
name: require('./package').name,

config(environment, appConfig) {
const addonConfig = appConfig['emberKeyboard'] || {};

if ('disableInputsInitializer' in addonConfig && !this.deprecationPrinted) {
// Do not print deprecation message multiple times
// as this hook may be invoked more than once.
this.deprecationPrinted = true;

this.ui.writeDeprecateLine(
'[ember-keyboard] The `emberKeyboard.disableInputsInitializer` option is obsolete. ' +
'You can remove it from your `config/environment.js` file.', false
);
}
},
};
3 changes: 1 addition & 2 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ module.exports = function(environment) {
},

emberKeyboard: {
listeners: ['keyUp', 'keyDown', 'keyPress', 'click', 'mouseDown', 'mouseUp', 'touchStart', 'touchEnd'],
disableInputsInitializer: true
listeners: ['keyUp', 'keyDown', 'keyPress', 'click', 'mouseDown', 'mouseUp', 'touchStart', 'touchEnd']
}
};

Expand Down

0 comments on commit 1a21943

Please sign in to comment.