Popovers: triggers click and focus can't be combined
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
The documentation says : "How popover is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space. manual cannot be combined with any other trigger."
But if you set data-bs-trigger="click focus" the click trigger doesn't work, only the focus trigger works.
I mean if you click again the button to close the popover, it doesn't close.
Bootstrap 5.3.0
Reduced test cases
Can take the example: https://getbootstrap.com/docs/5.0/components/popovers/#dismiss-on-next-click
and for the red "Dismissable popover" button, replace data-bs-trigger="focus" to data-bs-trigger="click focus".
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.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 reduced test case from the dismiss-on-next-click popovers documentation example, changing data-bs-trigger="focus" to "click focus". Reproduce the behavior in Chrome, then trace the popover trigger handling; done means both triggers work and clicking the button again closes the popover.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100