Skip to content

Trying to expand a dropdown after expanding another dropdown breaks the focus #41514

Open
@dibsyjr1

Description

@dibsyjr1

Prerequisites

Describe the issue

We've found a bug when updating to version 5.3.6, I think it's specifically related to the following commit:
#41365

Essentially if you have more than one dropdown, expanding one and then another will break the focus as the fix above returns the focus to the previous trigger after the focus is applied to the current trigger.

In the included codepen click one of the buttons/triggers and then the other, the focus will be applied to the opposite button/trigger. I've made the focus a big red glow so that it's as clear as possible.

Reduced test cases

https://codepen.io/team/bootstrap/pen/qBamdLj

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Chrome

What version of Bootstrap are you using?

5.3.6

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions