-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fixed Button doesn't reset to "Normal" if scrolled quickly to the top in IOS #25084
Conversation
…to the top in IOS
Hey there @NirmalKumarYuvaraj! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we include the sample from the gif and create an ui test?. Could use the DragCoordinates
method to tap down, drag outside the Button and release to verify the status. Then can use the VerifyScreenshot
method to validate the Button background color.
} | ||
void HandleButtonInteraction() | ||
{ | ||
if (VirtualView is IButton virtualView) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VirtualView
is an IButton
, can directly do:
VirtualView?.Released();
VirtualView?.Clicked();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added the changes as per your suggestion. Could you please validate it once from your end?
@jsuarezruiz The reported issue itself was replicating very rarely when scrolling quickly and the button press occurring concurrently. Tried adding the test case with the suggested input but the proper image is not getting generated to replicate the exact issue scenario. |
void HandleButtonInteraction() | ||
{ | ||
VirtualView?.Released(); | ||
VirtualView?.Clicked(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still want to trigger clicked if this is called from TouchCancel
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per the suggestion, we cross-checked and confirmed that the visual state of the button is reset without invoking the clicked event during TouchCancel
. Could you please verify this?
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
|
Root Cause:
The issue arises because the ScrollView is actively scrolling when tap the button. As a result, the TouchDown event is triggered, and the button's visual state is applied. However, the TouchUpInside event is not triggered upon release, preventing the button's state from updating correctly.
Description of Change:
Tested the behaviour in the following platforms.
Reference
N/A
Issues Fixed
Fixes #19246
Output
Before
Before.mp4
After
After.1.mp4