Bootstrap tooltip with wrong position inside a .table-responsive
See original GitHub issueOperating system: Ubuntu 20.04.2 LTS Browser: Firefox 87.0 Reduced test case: https://jsfiddle.net/3r9z1o84/
I’m having a problem while using Bootstrap tooltips inside a parent with overflow: auto
, more specifically inside a .table-responsive
div. Both buttons are inside a <td>
and have data-bs-placement="top"
, so the tooltip should be placed in the top of them, not anywhere else.
This is what is happening:
This is the expected behavior (when overflow-x
is removed):
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Bootstrap tooltip in wrong position on initial hover, then in ...
I think the problem is occurring because the div that the tooltip is attached to is absolutely positioned. Here is the div tag...
Read more >Tooltips - Bootstrap
Tooltip position attempts to automatically change when a parent container has overflow: auto or overflow: scroll like our .table-responsive , but still ...
Read more >Bootstrap tooltip not working correctly with DataTables
You're right, it is Bootstrap's tooltip placement messing with the table. For anybody who's interested in a solution that worked for me, check ......
Read more >How to Position Tooltip in button using Bootstrap
In Bootstrap 4, you can position the tooltip in various directions (left, right, top, bottom). The positioning of the tooltip is set by ......
Read more >How to get a Table to display in a Popover?
Popovers. Documentation and examples for adding Bootstrap popovers, like those found in iOS, to any element on your site.
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
Okay, this is not an issue. Instead a feature of Popper. 🙂 By default, the boundary for the flip modifier is
clippingParents
, so Tooltip gets flipped. If you want to prevent this behavior you need to change the boundary in the flip modifier using thepopperConfig
.PS: You can not use the boundary option provided by bootstrap since it is used for the
preventOverflow
modifier only.@pbuttelli I had success with the following
popperConfig
.