-
-
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
[FlexTable] onRowClick and onRowDoubleClick not working always #322
Comments
@bvaughn Here a another GIF demonstrating the source of this issue: |
While pointer events are disabled, clicks are ignored, as you've observed. Not sure there's much I can do about this though to be honest. Perhaps I could lower the interval slightly before they're reenabled... |
Even if I lowered the interval slightly- something I'm reluctant to do, for fear of turning off prematurely- there's still going to be some time when the browser is performing the scroll animation when users would not be able to click on rows. I think the best thing to do in this case is to use the |
My guess is that it's fairly unlikely that users are scrolling and clicking at the same time. It's kind of an awkward interaction. (Human brains need a bit of time to process what they're seeing when data has changed.) I suspect this may be something that we do as engineers that real users don't actually do? |
@bvaughn As you can see on the GIF there is much more time between the final scroll event and the re-enabling. About 800-1000ms. I also experienced in my application a delay by about 2 seconds. I will analyze this in production if it's a problem or not :) |
The gif doesn't show much, to be honest. Because it doesn't show when you're clicking. (There's no indication of ignored clicks.) The code for this is pretty straight forward. Each time Browsers manage a smooth scrolling animation that has kind of a long tail as it slows down and stops. Maybe you're perceiving the end of scrolling before it's actually done. (Maybe the browser fires a last few micro-adjustments.) I'm fairly confident this is what's happening. The last ~second of scrolling is just the tail end of the animation, not very noticeable. Also keep in mind that |
Yeah I unterstand. It looked at first like an issue with the library to me. I will close this now and open a new issue if this is really a problem. Like you said: It's maybe something a real user don't actually do. |
😅 Sounds good to me. |
Have the same issue with react-virtulized 7.16.0 |
@bvaughn I will reopen this. Experienced this issue now in production. Users don't see this as a problem with the application, but they are trying a second time the double click action. This is not the ideal situation. |
@mikhail-eremin I have never seen this happen and I've used react-virtualized a lot. If you could provide a repro case then I'll be happy to take a look. Else I'm a little skeptical because the code for this is fairly straight forward (see here, here, and here). Have you specified a custom/override value for You aren't, by chance, using @levrik Disabling pointer events while scrolling is something all of the windowing libraries do (see fixed-data-table, react-infinite, etc). However if you want to prevent (or change) this behavior, you have 2 options:
In general though, I don't plan on removing this feature as the default behavior. |
@bvaughn Yeah. I understand why I investigated this issue a bit more precisely now. It seems that the issue is something with Chrome (at least in my case). |
Ah. Interesting. Are you saying that unless you move your mouse a little bit before the click- the browser doesn't pick up on it? |
@bvaughn Yep. Exactly. |
Hmm... that sounds like a browser security feature. Maybe intended to prevent malicious sites from tricking a user into clicking something he didn't intend to by changing what was under a cursor. |
@bvaughn Makes sense. I will investigate this a bit more some day :) |
Sounds good. 😄 |
@bvaughn I will try you suggestions thank you! |
Hey there. Me again.
If I scroll a bit down in a FlexTable and try to click or double click on a row the handler does not get called. If I try again the handler does get called.
Here's a plunker: https://plnkr.co/edit/gAEv8xgCjCJ3IZtJTlx5
And a GIF demonstrating the problem:
The text was updated successfully, but these errors were encountered: