Skip to content

Commit 8c103a7

Browse files
authored
Handle un-pressing button when pointer interaction cancelled
1 parent 2d34815 commit 8c103a7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

maui/src/Button/SfButton.Methods.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,9 @@ public override void OnTouch(PointerEventArgs e)
821821
#if ANDROID || IOS
822822
else if (e.Action == PointerActions.Cancelled)
823823
{
824-
RemoveEffects();
824+
_isPressed = false;
825+
RemoveEffects();
826+
ChangeVisualState();
825827
}
826828
#endif
827829
else if (e.Action == PointerActions.Exited)

0 commit comments

Comments
 (0)