Describe the bug
We have a pane with all three breakpoints set. fastSwipeClose={true} is also set. When the pane is presented and the user interacts with content on the pane (tap to focus on an input field, tap somewhere else, etc) and then swipes down from the top to dismiss, the pane closes (as expected) but subsequent presentation of the pane immediately dismiss on the first interaction (tapping on the content).
To Reproduce
Steps to reproduce the behavior (see code pen example below):
Create a pane with all 3 break points
Make sure fastSwipeClose={true} is set
Present the pane to the middle or top break and engage with the contents of the pane (click in the content area)
Fast swipe to close from the top area of the pane and the pane closes
Present the pane again and click in the content area again
Pane immediately closes on first touch
Expected behavior
Pane should only close by fast swiping, not by merely touching after a fast swipe has completed.
Describe the bug We have a pane with all three breakpoints set.
fastSwipeClose={true}
is also set. When the pane is presented and the user interacts with content on the pane (tap to focus on an input field, tap somewhere else, etc) and then swipes down from the top to dismiss, the pane closes (as expected) but subsequent presentation of the pane immediately dismiss on the first interaction (tapping on the content).To Reproduce Steps to reproduce the behavior (see code pen example below):
fastSwipeClose={true}
is setExpected behavior Pane should only close by fast swiping, not by merely touching after a fast swipe has completed.
Additional context I believe the issue can be found in this if condition which returns on a fastSwipeClose. If the
steps
array was cleared before returning, the issue I'm experiencing goes away. https://github.com/roman-rr/cupertino-pane/blob/07f9d74cac5f71fd1bee10fa49a9b2b8280054f1/src/events.ts#L366Here's a code pen demonstrating the issue: https://codepen.io/rgoldiez/pen/wvydzja