The data-bs-delay='{"show": 500}' kills the tooltip style
See original GitHub issueHi,
I have recently updated from Bootstrap 4.6.x to 5.1.1. for my web-site www.uvvo.club
When migrating I have changed data-* to data-bs-*, including change data-delay='{"show": 500}'
to data-bs-delay='{"show": 500}'
With this line, the appearance of a tooltip is delayed for a half a second, however the style of the tooltip becomes just a grey box with text.
with data-delay='500'
it works fine, but I want the tooltip to disappear immediately after moving the mouse away.
OS: Windows 10 Browser: MS Edge Bootstrap v.5.1.1 is used via via jsDelivr
In the developer tools of the browser I get also:
jquery.min.js:2 Uncaught TypeError: TOOLTIP: Option “delay” provided type “string” but expected type “(number|object)”. at index.js:134 at Array.forEach (<anonymous>) at r (index.js:128) at Ye._getConfig (tooltip.js:680) at new Ye (tooltip.js:142) at profile?id=5f22c0c45c2e592e90429dfc:62 at Array.map (<anonymous>) at HTMLDocument.<anonymous> (profile?id=5f22c0c45c2e592e90429dfc:61) at e (jquery.min.js:2) at t (jquery.min.js:2)
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
@GeoSot thank you for the hint. Following your advise, I’ve added the following code to my layout file:
which delays all the tooltips on the page and works fine. I do not know the best way, how to delay only some of the tooltips and leave other tooltips to appear immediately.
I know there’s a comprehensive looking PR (#35077 thanks @GeoSot) to address this regression but i thought i’d make a codepen to demonstrate cleanly, which is here:
https://codepen.io/jonnybradley/pen/yLpqLbP
Note that this worked fine in bootstrap 3 and 4 but presumably then jQuery was doing the JSON parsing for us?
Meanwhile i guess we’ll work round it…