Skip to content
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

Swipe target view with passTouchEventToAnchor issue #713

Closed
ahrybuk opened this issue Sep 25, 2024 · 4 comments
Closed

Swipe target view with passTouchEventToAnchor issue #713

ahrybuk opened this issue Sep 25, 2024 · 4 comments
Labels
Release Next This feature will be released on next version

Comments

@ahrybuk
Copy link

ahrybuk commented Sep 25, 2024

I have swipeable button, that used as a target. I also set passTouchEventToAnchor = true.

Problem - when I start swiping everything work as expected, button have actual swipeable state, but if I move finger outside target element I have not receive touch event.
I think this can happened because of next part in lib

if (rect.contains(event.rawX.toInt(), event.rawY.toInt())) {
anchor.rootView.dispatchTouchEvent(event)
true
} else {
false
}

So, whenever swipe goes out of target container I don't receive any event at all and my button "freeze" with "half-swipe" state, even I move my finger out of screen.

@skydoves
Copy link
Owner

Hey @ahrybuk, so you mean, the touch dispatcher works well if you exactly touch inside the anchor, but it doesn't delegate the even when you swipe, right?

@ahrybuk
Copy link
Author

ahrybuk commented Sep 26, 2024

@skydoves hi, thanks for quick response.
I mean, it's delegate correctly while you swiping inside target container area, but if swipe starts going outside target area - swipeable button does not receive any event and think that user still touch button in the place, where swipe goes outside target container.

@skydoves
Copy link
Owner

@ahrybuk Thanks for the clarification! This will be fixed on the next release.

@skydoves skydoves added the Release Next This feature will be released on next version label Sep 26, 2024
@ahrybuk
Copy link
Author

ahrybuk commented Sep 26, 2024

Nice, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release Next This feature will be released on next version
Projects
None yet
Development

No branches or pull requests

2 participants