Dropdown opens and re-closes with one click in Firefox when emulating mobile device
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 175k
- Forks
- 78.6k
- Avg merge
- 7h 19m
- Merged PRs (30d)
- 35
Description
Prerequisites
- I have searched for duplicate or closed issues
- I have validated any HTML to avoid common problems
- I have read the contributing guidelines
Describe the issue
When clicking on a dropdown menu in quick succession, clicks after the first seem to trigger both a show and hide event, so the menu ends up in the same state (either shown or hidden) as when I clicked. I've provided a minimal CodePen example below and included a GIF of the behavior exhibiting.
This happens in Firefox when emulating a mobile device. I used Galaxy S20 Android 11. It does not occur when using Firefox at a normal resolution with no mobile emulation enabled. It does not occur in Chrome with or without emulation.
In this GIF, I click a few times slowly to demonstrate the menu opening and closing as expected. I then click somewhat quickly, and the menu frequently opens and re-closes or closes and re-opens in response to a single click.

Reduced test cases
Minimal reproduction example. A menu with a single dropdown element.
https://codepen.io/ryanwawr/pen/gOBOYWd?editors=1111
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Firefox
What version of Bootstrap are you using?
5.2.3 in CodePen. Also exhibits in a project I'm developing that uses 5.1.0.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodePen reproduction in Firefox using Galaxy S20 mobile emulation, then compare its click behavior with normal Firefox and Chrome. Trace the show and hide events triggered by one click; done means each click changes the dropdown state only once without reopening or re-closing it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100