-
Notifications
You must be signed in to change notification settings - Fork 34
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
Menu: preventing default key event behaviours + adding menu tests #85
Menu: preventing default key event behaviours + adding menu tests #85
Conversation
* add-menu-key-event-methods: refactor: prevent default keydown events
Thanks for this @roomman. Perhaps you would add a test to ensure that we don't regress here in future? |
* upstream-master: ember-cli-typescript blueprint forgot to install destroyable types Resolve prettier issues in non js/ts files, resolve lint warnings Convert utils/keyboard to TypeScript create a `tag-name-is-component` helper Add typechecking to CI Convert the dialog and the dialog stack provider to typescript Fix the blueprint output ember install ember-cli-typescript Fix remaining lint violations Resolve auto-fixable lints Add support for linting typescript
Looking great @roomman, nice one. There are some commented out lines with JSX in them, perhaps you could remove them and squash into a single commit when you're ready to merge? |
Sorry @GavinJoyce that's supposed to be wip, committed to my local branch. My bad. Will submit the full PR when done 👍🏻 |
👍 sounds good, thanks |
Spotted these tests were missing when comapring with the vue implementation. Not sure how helpful they are given the browser defaults for disabled elements, but adding them for symmetry.
@GavinJoyce here's the full PR as promised. I'll circle back and add tests for the remaining keydown modules in the next week or so, subject to workload. Originally, I was supposed to be addressing your comment above, about protecting against regressing for |
Just poking about in the dummy app, these changes seem to introduce a bug where pressing
|
@GavinJoyce looking into it now. |
* upstream-master: ember-cli-typescript blueprint forgot to install destroyable types Resolve prettier issues in non js/ts files, resolve lint warnings Convert utils/keyboard to TypeScript create a `tag-name-is-component` helper Add typechecking to CI Convert the dialog and the dialog stack provider to typescript Fix the blueprint output ember install ember-cli-typescript Fix remaining lint violations Resolve auto-fixable lints Add support for linting typescript
Hi @GavinJoyce, so it turns out that the bug is unrelated to this PR, and was introduced in this commit. My best guess is that it's related to the introduction of the Are you happy for me to add some additional tests to the |
That said, I just wrote a test, on a branch where the bug is present, navigating to a menu item using |
Thanks @roomman, this is great! |
This PR is very simple, calling the
preventDefault
andstopPropagation
methods for key down events in the menu component. This prevents the default scrolling events when up and down arrows are used.Fixes #80