-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
[BUG] disableDrag() disables all click events #140
Comments
@tsungweihsu Thank you for issue. Seem's that need make an enhancement. If i correct understand, you must be able to click on buttons inside pane, even if pane with non-draggable state ? |
@roman-rr Thanks for your quick rely, really appreciate it. Yes, it would be nice if buttons are still interactable . But is it actually by default that buttons are not clickable when the pane is in non-draggable state? Because buttons are actually still clickable when the pane is non-draggable in some cases, namely starting from position bug.mp4
Start from:
To:
|
@tsungweihsu i assume that you are using react. But let's try to reproduce first with pure js.
As you can see, button clickable. I miss somethings ? |
@roman-rr thanks for trying to reproduce the issue could you try changing breakpoints and disabling drag at the same time or execute them without clicking? Maybe you could change the code a bit to check if it can be reproduced? Thank you in advance 🙂 |
I've played with your code a bit directly on jsbin and successfully reproduced the issue but with some small changes:
How to trigger the issue:
I think the issue is caused by |
@tsungweihsu thank you for details. I found the reason and made a fix. Will be available in few days with |
Describe the bug
This bug only occurs when the pane is at bottom position following the change of break points and
disableDrag()
.There are originally three break points, namely
'top'
,'middle'
,'button'
enabled. Through a trigger, the break points are set to have only'middle'
enabled and the rest are disabled throughsetBreakpoints()
. Visually, the pane jumps to the middle position.disableDrag()
is then triggered from the eventonTransitionEnd
initiated by the jump fromsetBreakpoints()
. The elements in the pane are non-clickable afterwards but the pane can still be scrolled but not draggable.Troubleshooting already done
'bottom'
, the bug occurs. When the pane is at 'top' or 'middle' position following the same consecutivesetBreakpoints()
andonTransitionEnd
->disableDrag()
, the bug does not occur, the elements are still clickable.disableDrag()
(
setBreakpoints()
->onTransitionEnd
-> 5 seconds wait time ->disableDrag()
)the elements are still clickable after
setBreakpoints()
but non-clickable afterdisableDrag()
. Strange thing is when an element is clicked during the wait time, after executingdisableDrag()
, the elements are still clickable. However, when no mouse events are given during the wait time, after executingdisableDrag()
, the elements are non-clickable.To Reproduce
Steps to reproduce the behavior:
bottom
positionsetBreakpoints()
disableDrag()
Expected behavior
Click events should still be able to fire.
Smartphone:
The text was updated successfully, but these errors were encountered: