You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix nested buttons on Android and buttons becoming unresponsive in a list (#2187)
## Description
Should fix#2160
This PR changes the logic of responder by splitting it in two: one for
sound and one for touch exclusivity. Button can become the touch
responder when `setPressed` method is called with `pressed` set to
`true` and it also is the touch responder. The sound responder is freed
in the `performClick` method - after that point `setPressed` should only
be called with `pressed` set to `false` for existing pointers. This
prevents the sound effect from being played more than one time when
pressing on nested buttons.
It also adds more ways to free the responder: it reverts a change from a
while back that frees responder on gesture end and frees the responder
when button holding it receives `POINTER_CANCEL` event. Because of that,
the responder should always be freed correctly, preventing the buttons
from becoming unresponsive.
## Test plan
Tested on the example app (using the new and existing example) and on
the code from the issue.
0 commit comments