-
Notifications
You must be signed in to change notification settings - Fork 290
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
Scrolling horizontally using gestures causes browser to navigate through history instead of scrolling the table. #154
Comments
So I have narrowed it down - This bug is NOT due to chrome.. it is in fact due to the OS version I am on. |
Hi @josh08h ! It looks like the bug is indeed tied to 10.11.6 OS X El Capitan. Trying on 10.12 Sierra and even 10.11.3 El Capitan did not reproduce the bug. But, it also seems the bug is only showing up on Chrome - maybe even just Chrome 58 - at least when compared to just Firefox and Chrome 57. Also, to clarify your repro steps: are you able to scroll to the right, but not left? What I'm seeing is that any attempt to scroll left will take me back a step in history, but I'm still able to scroll right as long as there is space left to scroll. Another interesting thing is that if I switch tabs and then go back to the FDT tab, I am able to scroll left once. Then, I can't again. There is also a bit of inconsistency involved. Overall the issue is very reproducible on 10.11.6 with Chrome 58, but sometimes the left scroll does work. Usually it's only very briefly when it does though. Can you please confirm that both 10.11.6 and Chrome 58 are necessary to repro, and that specifically scrolling left only does not work? Can you also please confirm that magic mouse behaves the same way under the same conditions as the trackpad? Was not able to test with magic mouse, but we should have one available tomorrow to try out, so I would like to first clarify expectations. |
Hey @josh08h - it looks like it's OSX and Chrome in general, not just 10.11.6 and Chrome 58. We were just able to reproduce on OSX Sierra 10.12.4, using Chrome 57. I also found a bunch of articles about mac trackpads not working properly with Chrome. The workarounds are about the same for magic mouse and trackpad. Here they are: Magic mouse workaround (worked for me):
Trackpad workaround (worked for me):
Other possible workarounds:
Unfortunately I’m not sure we can do much on the FDT side since this seems like an OSX and Chrome issue. Please get back to me about the workarounds! Hope this helps. Sources: |
It's probably caused by https://developers.google.com/web/updates/2017/01/scrolling-intervention (you should also see a warning in the browser console). Adding the following CSS should fix the issue:
|
That seems like a reasonable cause. @josh08h could you test out that change and submit a PR if it solves the issue you're having? |
Given maksis's feedback. I'm going to make a few changes to better support this behavior. On master, don't bind the touch listeners unless touchScrollEnabled is true. I'm also going to subscribe to facebook/react#6436 @KamranAsif @quixotically any thoughts or concerns? |
Ya I plan to try the touch example out to ensure things work as expected. And also do my best to ensure I can't reproduce the issue referenced here. Although I had trouble reproducing and we haven't fixed it yet, so I don't think it will get worse. Do you have any other suggestions for testing? |
Cool. And ah yeah, reproing this is hard, especially if the issue is still gone after we rebooted your machine. Sorry, I don't have any other suggestions for testing. So, I think it's fine if you can just make sure there is no obvious break. |
Apologies for the absence recently. I can confirm
does not fix the issue for me. |
That's unfortunate. Would it be possible for you to fork FDT and remove the touch listeners to see if that addresses the issue? |
In the Terminal, enter:
Restart Chrome and the swipe navigation should be disabled. To change the setting back to default enter:
|
No update beyond the solutions in this thread. We'd be happy to accept a PR if you make any progress in your investigation. It may be worth looking at why macs propagate the touch swipe even though preventDefault is called in ReactTouchHandler and ReactWheelHandler. It may be worth moving that around / ensuring it's called as expected. |
…wser to navigate through history instead of scrolling the table.
I believe this should be fixed with the v1.0.0 release, since we use native event handlers. Feel free to respond and reopen otherwise. |
Expected Behavior
The table should scroll to the left and right. If scrolling to the left and reach the beginning of the table, then the browser should navigate backwards in history.
If scrolling to the right and reach the end of the columns, the browser should navigate forward in history.
Current Behavior
The page history navigation seems to take over the scrolling of the table.
Possible Solution
Steps to Reproduce (for bugs)
Go to http://schrodinger.github.io/fixed-data-table-2/example-object-data.html
Resize the browser so that not all columns are visible.
Scroll horizontally using gestures on touchpad or magic mouse whilst mouse is over the table.
The browser will try to navigate back in history however we should see the table columns scroll.
Context
Our staff use gestures to navigate around the screen and this constantly makes them navigate back in their browser history.
Your Environment
Chrome 58.0.3029.96 (64-bit)
10.11.6 OS X El Capitan
The text was updated successfully, but these errors were encountered: