Description
🐛 Bug Report
We have a server side Blazor web app that we deploy to Azure Container Apps (ACA) behind Azure Application Gateway (AGW). We have noticed that the Checkbox
, Switch
, and Radio
controls do not trigger the event callback when they change.
💻 Repro or Code Sample
- Create an app that contains the switch control:
<FluentSwitch @bind-Value="@isFiltered" @bind-Value:after="@OnFilterChanged">Show all</FluentSwitch>
<p>@this.someValue</p>
and add a test callback handler:
private string someValue = "Text";
private void OnFilterChanged()
{
this.someValue = "Filtered applied";
this.StateHasChanged();
}
- Make sure you can run this locally and you can see
Filtered applied
after flipping the switch. - Deploy this app to ACA and make sure the deployment is behind the AGW.
💡Important note: This issue reproduces when the app is deployed to ACA along with AGW. However, it does not reproduce when deploying to ACA without AGW.
🤔 Expected Behavior
The behavior should be akin the local behavior, we should be able to see the effects of calling OnFilterChanged
.
😯 Current Behavior
The call back does not get invoked for neither Switch, Checkbox, Radio controls.
💁 Workaround
We reviewed the code of the switch and it does not use the checkbox HTML control but it is an SVG image. Our workaround was to create a FluentUI looking switch like this (with CSS + JS to have the same look and feel):
<input type="checkbox" class="fluentui-switch-input" id="@id" @bind:get="Value" @bind:set="OnValueChangedAsync" />
🔦 Context
We rather not use the workaround that I described above. Given that these are basic controls, we expect them to be reliable regardless of the environment.
🌍 Your Environment
- Microsoft.FluentUI.AspNetCore.Components Version=4.11.7
- dotnet: 9
- Server OS: Azure Linux
- Client OS: Windows 11
- Client Browser: Edge