Skip to content

fix: Event callback does not trigger for Switch, Checkbox and Radio controls when deployed to Azure Container Apps along with Application Gateway #3599

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

Open
mgdelcar opened this issue Mar 31, 2025 · 1 comment
Labels
triage New issue. Needs to be looked at

Comments

@mgdelcar
Copy link

🐛 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

  1. 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();
}
  1. Make sure you can run this locally and you can see Filtered applied after flipping the switch.
  2. 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
@microsoft-github-policy-service microsoft-github-policy-service bot added the triage New issue. Needs to be looked at label Mar 31, 2025
@vnbaaij
Copy link
Collaborator

vnbaaij commented Apr 1, 2025

Let's chat internally to see how we can work on this. I tried to set up a reproduction but was not successful...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage New issue. Needs to be looked at
Projects
None yet
Development

No branches or pull requests

2 participants