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
How can I disable Keyboard Scrolling? #52
Comments
Ah, right. Currently it is not possible to disable keyboard scrolling for a event.preventDefault()
event.stopPropagation() |
Going to close this as answered for now. Please let me know if you still have questions though :) |
Yeah no worries abwt closing it :) |
Ah, I see. I am suggesting that you could listen for the event you care about (in this case the keyboard event) and prevent it from getting up to the |
yeah but that's annoying cuz then i'd need to pass it to the other library i want to listen to that even. |
No, you wouldn't. You could just wrap the other library you're using and stop up/down arrow events from bubbling up any further. Something like... <VirtualScroll>
<div onKeyDown={yourEventHandler}>
<TheOtherLibrary/>
</div>
</div> |
I'm taking a look at using the VirtualScroll component but the lack of bubbling events is a dealbreaker. IN our case I need the key events to propagate to a higher component that manages state like the currently selected cell, (think like excel's keyboard navigation). I appreciate the value that the keyboard scroll adds...is the stopPropagation necessary? PreventDefault should already kill any scroll behavior no? |
Good suggestion, @jquense. I believe you're right. :) |
@jquense check out 4.6.1. I've removed |
…ary to prevent keyboard event bubbling, only to prevent the default browser behavior. Built as 4.6.1.
Each of the rows i'm putting in the VirtualScroll contain a selectable dropdown where the user can select options with his keyboard.
However, pressing the down button, starts to scroll the VirtualScroll List.
Would disabling this scroll fix the issue for me?
The text was updated successfully, but these errors were encountered: