Skip to content
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

Added support for 'keydown' and 'keyup' events #6421

Merged
merged 2 commits into from Jan 14, 2019

Conversation

OrBin
Copy link
Contributor

@OrBin OrBin commented Dec 2, 2018

Added support for 'keydown' and 'keyup' events, as requested in issue #5734

Copy link
Member

@perliedman perliedman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for submitting this! 👍

Given that this looks like a change that possibly affects many existing application (potentially changing how we react to keyboard), I would really like to see some tests for this.

There are already quite a few tests that simulate keypress using happen, so I would assume you could do something similar. See in particular https://github.com/Leaflet/Leaflet/blob/9fda888df2791ca0df6f182a9d91d393ee49034c/spec/suites/map/handler/Map.KeyboardSpec.js

…constified the key codes used in the test file
@OrBin
Copy link
Contributor Author

OrBin commented Dec 20, 2018

I've added tests for keyup, keydown and keypress. Is it OK?
I hope it's what you meant, I don't have much experience with testing.

@perliedman perliedman merged commit 59a2d75 into Leaflet:master Jan 14, 2019
@perliedman
Copy link
Member

👍 Good work with the tests, looks quite thorough. Again, thanks for submitting this (and sorry about taking way too long to follow up on your changes).

@OrBin OrBin deleted the support-keydown-keyup-events branch June 11, 2019 04:32
Schleuse pushed a commit to Schleuse/Leaflet that referenced this pull request Dec 3, 2019
* Added support for 'keydown' and 'keyup' events, as requested in issue Leaflet#5734

* Added tests for 'keydown', 'keypress' and 'keyup' events binding and constified the key codes used in the test file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants