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
{{ message }}
This repository has been archived by the owner on May 1, 2024. It is now read-only.
If a system event occurs while a button is pressed the button released event isn't fired anymore.
The background-color is still on pressed button state.
Steps to Reproduce
Hold down a button
With the other hand pull down the iOS-Control-Center and release it
Expected Behavior
The button is in released state.
Actual Behavior
The button is still in pressed state.
Basic Information
Version with issue: 4.8.0.1687
iOS: 13.7
Workaround
using System;
using App.Libraries.UiComponents.iOS.Renderers;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly: ExportRenderer(typeof(Button), typeof(ButtonRendereriOS))]
namespace App.Libraries.UiComponents.iOS.Renderers
{
public class ButtonRendereriOS : ButtonRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Button> e)
{
base.OnElementChanged(e);
if (Control != null && e.NewElement is Button view)
{
Control.TouchCancel += SendReleased;
}
}
protected override void Dispose(bool disposing)
{
if (Control != null)
{
Control.TouchCancel -= SendReleased;
}
base.Dispose(disposing);
}
void SendReleased(object sender, EventArgs e)
{
((IButtonController)Element)?.SendReleased();
}
}
}
The text was updated successfully, but these errors were encountered:
Description
If a system event occurs while a button is pressed the button released event isn't fired anymore.
The background-color is still on pressed button state.
Steps to Reproduce
Expected Behavior
The button is in released state.
Actual Behavior
The button is still in pressed state.
Basic Information
Workaround
The text was updated successfully, but these errors were encountered: