ngx-bootstrap icon indicating copy to clipboard operation
ngx-bootstrap copied to clipboard

Tooltip CSS wrong on Bootstrap 5.2

Open damient opened this issue 3 years ago • 8 comments

Bug description: Bootstrap 5.2 changed / removed CSS classes and because of that tooltip placement is wrong.

Bootstrap 5.2 commit : https://github.com/twbs/bootstrap/commit/8aaeb3cb6b5fe4f3eb6ed5872e172404aa8397a6

ngx-bootstrap: 8.0.0 or 9.0.0-RC2 Angular: 14.1 Bootstrap: 5.2 (works with 5.1)

Fix Proposal: Use Popper.js to display tooltip Get CSS classes from Popper.js and add it on top of bootstrap 5.2

damient avatar Jul 24 '22 21:07 damient

Same here 9.0.0-RC2 Angular 14.2 Bootstrap 5.2... tooltips and popovers doesn't work anymore...

Tried with container="body" boundariesElement="viewport" or with/without placement="bottom" etc.... It seems without placement, something happened but totally wrong size.

Hope the next RC will love this. Thanks

lostation avatar Jul 25 '22 18:07 lostation

same here with bootstrap 5.2,tooltips are shown behind buttons,fixed reverting to Bootstap 5.1.3

mrjohnr avatar Jul 26 '22 13:07 mrjohnr

same here with bootstrap 5.2,tooltips are shown behind buttons,fixed reverting to Bootstap 5.1.3

Indeed...but then I get back the warning

(2446:3) autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated...

lostation avatar Jul 26 '22 19:07 lostation

And this solves the warning issue -> https://stackoverflow.com/questions/72373408/webpack-utoprefixer-replace-color-adjust-to-print-color-adjust-the-color-adj

lostation avatar Jul 26 '22 21:07 lostation

Temp workaround is to add this to your stylesheet:

.popover { position: absolute; top: 0; left: 0 #{"/* rtl:ignore */"}; }

.popover-arrow { position: absolute; }

.tooltip { position: absolute; }

.tooltip-arrow { position: absolute; }

emonney avatar Jul 29 '22 13:07 emonney

Removed "position", "top", "left" properties: https://github.com/twbs/bootstrap/commit/8aaeb3cb6b5fe4f3eb6ed5872e172404aa8397a6#diff-e8a1ed084f5e1df29caf257153dc7f5a9507e15e64dc8d98964d85c2e9928924

ahirov avatar Aug 25 '22 00:08 ahirov

Confirmed. I have the same problem using "bootstrap": "5.2.3" and "ngx-bootstrap": "10.2.0".

I also confirm that @emonney 's solution works, thank you very much.

FrancescoBorzi avatar Dec 29 '22 11:12 FrancescoBorzi

Faced the same issue with the wrong tooltip position. ngx-bootsrap: 9.0.0 bootstrap: 5.2.3

Could someone advise when this is going to be fixed?

petro-konopelko avatar Apr 26 '23 16:04 petro-konopelko