-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecation error with simple keyboard shortcut implementation #194
Comments
Hi @Wolfr, I'm glad you're enjoying the addon! The deprecation warning you're getting is documented on the deprecations page: http://adopted-ember-addons.github.io/ember-keyboard/deprecations (see the initializer section at the bottom). I've pasted the relevant portion here: -- ember-keyboard-first-responder-inputs initializerember-keyboard includes an initializer that reopens ember's TextArea and TextField components and mixes in EKMixin and EKFirstResponderOnFocusMixin. The on-key modifier added in 6.0 accomplishes a similar goal in a less intrusive and less hidden way. This initializer will be removed in 7.0. To opt out of it now and remove the deprecation warning, disable the initializer by setting Related to this, if you were importing { initializer } from 'ember-keyboard' in any integration tests, this should no longer be necessary as Ember integration tests now run initializers themselves. This export will be removed in 7.0 as well. -- I know it's annoying to have to deal with this as a new user, and I apologize for that. It is the best way I could come up with to ensure that we bring all users along the upgrade path safely. |
Excuse my ignorance, but if I put this in If I try I tried to add the code on L28 similar to this Gist. |
@Wolfr The change should look like this: https://github.com/rust-lang/crates.io/pull/2563/files#diff-695693c5dabaffb064bde5b060195ff7 |
question: I'm using |
@optikalefx no deprecation should not be triggered by using keyResponder. Did you configure your config/environment.js file (like this)? |
@lukemelia that was it! missed that detail. Thanks for the fast response. |
Hi – I wanted to check I have missed something because am still getting a couple of deprecations after adding this to my config ENV...
I'm using It removed a bunch of deprecations, but I still get these two... Am I missing something? So far the only use is a very simple one in a template
Thanks! |
@chrism would you mind sharing reproduction of the issue you have? this shouldn't be a problem anymore |
@SergeAstapov I see the a lot of deprecation warnings too, using a simple implementation like this: ( |
Actually |
@didoo 8.1.0 is out fixing |
I implemtented two simple keyboard shortcuts in my app:
These toggle the visibility of something:
However, I get a long depreciation stack trace . I think I used the latest syntax as documented here.
If I remove the 2nd shortcut, I don't get the stack trace. However, it is recommended in the docs to do it this way for multiple shortcuts.
Would anyone have an idea why I am getting this stack trace? I loved the simplicity of this package btw.
The text was updated successfully, but these errors were encountered: