Tooltip: this.tip.querySelector(...) is null
Created by: jwiesler
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
Changing data-bs-original-title
of an empty html tooltip to some nonempty string causes this querySelector
to return null
on hover.
This happens since _sanitizeAndSetContent
removes the .tooltip-inner
element and the tip
does not get updated before while the isWithContent
check passes now. This might be fixed by regenerating the tooltip on hover.
Reduced test cases
https://codepen.io/OptimalSloth/pen/NWvJmbE
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
No response
What version of Bootstrap are you using?
5.1.3