5.2.0: Popover - Unable to use `getInstance` on `.popover` element
See original GitHub issuePrerequisites
- 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
Regression from v5.1.3
. Can no longer get the Popover instance from the .popover
element itself.
e.g.
const popover = bootstrap.Popover.getInstance('.popover');
// popover will be null
it now only works when using it on the trigger, e.g.
const popover = bootstrap.Popover.getInstance('.popover-trigger');
// popover will contain the popover element
Reduced test cases
v5.2.0: https://stackblitz.com/edit/h7ep9y?file=index.html,index.js v5.1.3: https://stackblitz.com/edit/h7ep9y-vtddun?file=index.html
What operating system(s) are you seeing the problem on?
Linux
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
v5.2.0
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Popovers · Bootstrap v5.0
Documentation and examples for adding Bootstrap popovers, like those found in iOS, to any element on your site. On this page. Overview; Example:...
Read more >How do you create and modify popover in Bootstrap 5 using ...
You need to get instance of popover and then use popover_instance._config.content ="some message" to set new content inside your popover .
Read more >Bootstrap JS Popover Reference - W3Schools
Name Type Default Try it
animation boolean true Try it
container string, or the boolean false false Try it
content string "" Try it
Read more >Popovers · Boosted v5.1
Example: Using the container option. When you have some styles on a parent element that interfere with a popover, you'll want to specify...
Read more >Overlays | React-Bootstrap
You can also also have an "arrow" element, like the tooltips and popovers, ... Pro Tip: Using the function form of OverlayTrigger avoids...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s what I thought, thank you @GeoSot!
Something like ???
(same for tooltip)