-
Notifications
You must be signed in to change notification settings - Fork 1k
onClick doesn't work when onDrag and onStop are present #419
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
Comments
How to solve it |
same question |
I don't know if it solves your problem, but a hint alright: With your code, when you perform a drag, you are going to get an So in your code Related: #350 |
|
same question. anybody solved ? |
Here's an approach that worked for me #49 (comment) |
Sorry about the rubbish title, couldn't think of a way to make it concise :P
Basically I have a draggable tab (which is used to display a full screen map), I can successfully drag the tab left and right (as desired) and I can click the tab to toggle it in and out of view.
However, when I add a function to the 'onStop' handler, the click functionality stops responding. It still registers clicks, but doesn't actually toggle the map (like it did correctly when I didn't have an onStop handler)
UPDATE: I've noticed that when I click the drag handle, it's also firing the onStop event TWICE (shouldn't this only happen onDragStop?)
I'll add my code below for reference (i'm omitting all the uneccesary stuff incase you wonder).
JSX:
JS:
The text was updated successfully, but these errors were encountered: