Skip to content

[Bug] Firefox blue bar #591

@Jimmys20

Description

@Jimmys20

There was an older issue about a blue bar appearing on Firefox #501 that was closed as fixed by a newer browser version but I'm still getting this problem when using Firefox version 132.0.2. It appears because a div inside the focus-trap gets focused and disappears when you click anywhere in the page and it loses focus. You can work around the problem by using a css style like:

blazored-modal-focus-trap > div:focus-visible {
  outline: 0;
}

BlazoredModal

Also it happens only on the modals that I show automatically after the page loads (without user interaction). The modals that open later after a button click don't show the blue bar (I guess because the focus changes to the clicked button).

Can be reproduced on Firefox by editing Home.razor in InteractiveWebAssembly sample project and adding following code:

 protected override void OnAfterRender(bool firstRender)
 {
     if (firstRender)
     {
         Modal.Show<Confirm>("Welcome to Blazored Modal");
     }
 }

Modal2

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingTriageIssue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions