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

Open
@mgdelcar

Description

@mgdelcar

🐛 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNew issue. Needs to be looked at

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions