-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
VirtualScroll takes over arrow keys #156
Comments
Sorry for the sucky bug report. I see in #121 that other components support keyboard navigation, but I don't see what that has to do with I will post a test case tomorrow; it's late tonight and I thought you might know exactly where to look. |
Hey @jlongster! Hope you're well. No need to post a test case. I know what's causing the issue you report. (It's this method in
Both However, as you point out in this example...it does make inner Now I am questioning this behavior as a default. As you mention the discussion on #121 mentions potentially refactoring the keyboard navigation out of |
I just published version 5.5.4 which should improve the behavior you're talking about. I'm going to leave this issue open for more consideration though. It's not clear to me whether I should...
I'm leaning toward option 4. Edit: One awkward edge-case about approach #4 is that for Safari and Chrome, the browser's built-in arrow-key-scrolling will take over if I ignore the event and the cursor is at the edge of the input. The resulting scroll doesn't snap to grid cells. That makes the interaction kind of weird. |
4 is not best option since it wouldn't fit a case with control "selected" row from arrow keys. |
4 would have to take contenteditable into consideration also. On Wed, 16 Mar 2016 07:40 Aleksey Guryanov, [email protected]
|
I'm leaning towards #1. Why does In fact, now that I'm looking, there is strange interaction with up/down. If I scroll with the trackpad so that half of the top item is cut off, pressing "down" jumps down items but the top item is still cut off because there's an offset. I'd very much prefer all of this to be opt-in. |
Thanks for a quick release also! That makes it a little better. |
FWIW in the latest release, pressing up/down scrolls the container even though the input is focused. As far as I know that shouldn't happen: if I'm in an input the browser doesn't scroll it's container. I know you did a quickfix but just wanted to explain other side effects. No rush on this! |
Thanks for the feedback folks. After sleeping on it, I'm leaning towards creating a HOC that manages arrow-key "snapping" behavior (so you scroll by exactly the width/height of a cell) and just leaving that off by default entirely. Busy week for me but I'll try to see if I can't put together a release by the weekend. |
@jlongster |
I figured they share a lot of code, I think the |
Really! Confusing? :) I thought grid, datagrid, etc. was a pretty standard name but... naming things is hard! I'd be curious what you would find a more appropriate name if you have any suggestions. |
I have no suggestions :) My initial impression of |
I believe I am starting to lean toward option 5: remove this functionality entirely. :) I've been working on option 1 in a branch- removing the arrow-key handling from |
I've put together PR #159 to illustrate my thoughts on the direction for option 1. Feedback is welcome. :) |
Btw @jlongster, version 6 was released just a moment ago. You should be able to completely opt-out of key-arrow handling now (it is the default in fact). Thanks for raising this issue. :) |
Replaced react-pure-render with react-addons-shallow-compare
I am rendering an input in an item, and the cursor inside the input cannot be controlled with the left/right arrows keys. What is taking over this behavior? Not much more to say about it, I'm sure you know what I'm talking about :) If not I can post a small test case.
Is there a way to turn it off?
The text was updated successfully, but these errors were encountered: