-
-
Notifications
You must be signed in to change notification settings - Fork 78.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltip: this.tip.querySelector(...) is null #35375
Comments
I can confirm the case, but it is a bit strange case here. You want an empty tooltip to work, but with a 'custom not documented' way. Anyway, Maybe changing this check, would help. I would suggest not to use it, this way, but you can also try to make an MR with proposed changes |
I just want to change the content of the tooltip but setContent is not exported and not documented, even though it exists and searching for a way to do this brings up using this undocumented attribute. If there is no way, I will just do a MR. |
You are very right on what you said, and I do not know any valid way right now. |
Ok, I think I will wait for that, thank you. |
Prerequisites
Describe the issue
Changing
data-bs-original-title
of an empty html tooltip to some nonempty string causes thisquerySelector
to returnnull
on hover.This happens since
_sanitizeAndSetContent
removes the.tooltip-inner
element and thetip
does not get updated before while theisWithContent
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
The text was updated successfully, but these errors were encountered: