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

prevent default page scroll when using ArrowUp/ArrowDown #119

Merged
merged 1 commit into from
Feb 28, 2018

Conversation

dominicfraser
Copy link
Contributor

When the page height is greater than the viewport height ArrowUp and ArrowDown are used to move the page up and down for a key board user.

Currently when the focus is on the slider handle ArrowUp and ArrowDown can have the unintended side effect of also scrolling the page as well as moving the handle.

By adding e.preventDefault only the handle will move, and the page will not scroll. Once the user tabs away from the slider the page can again be scrolled using the arrow keys.

@mpowaga mpowaga merged commit 9a158e7 into zillow:master Feb 28, 2018
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.

2 participants