Skip to content

Commit 9255830

Browse files
Merge pull request #229 from Felicity-R/Felicity-R-patch-228
Handle un-pressing button when pointer interaction cancelled
2 parents 95440a1 + 8c103a7 commit 9255830

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
@@ -870,7 +870,9 @@ public override void OnTouch(PointerEventArgs e)
870870
#if ANDROID || IOS
871871
else if (e.Action == PointerActions.Cancelled)
872872
{
873-
RemoveEffects();
873+
_isPressed = false;
874+
RemoveEffects();
875+
ChangeVisualState();
874876
}
875877
#endif
876878
else if (e.Action == PointerActions.Exited)

0 commit comments

Comments
 (0)