You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the template completely before filling it in.
Context
I've been trying to convert a project from materializecss 1.0 to 2.0, but it doesn't seem like html tooltips are working. This may be because I am dynamically generating both the tooltip trigger and content elements, but I'm still calling M.Tooltip.init on the tooltip triggers after generating the new elements (and have confirmed that the elements exists at the time that method is invoked).
Current Behavior
It appears that using the data-tooltip-id attribute on tooltip triggers does not actually allow for HTML in tooltips. The tooltips appear, but they are empty.
Expected behavior
The html from the specified content elements should display.
Possible Solutions or Causes
I don't really know exactly what would be causing it, but I did see that the docs are somewhat out of date related to the removal of the unsafeHTML option. I'm not using that option, but it seems possible that removal of that option also did something to break the data-tooltip-id method of html in tooltips.
Steps to reproduce
I copy and pasted the example code from the docs into this jsfiddle, and it shows the same issue: https://jsfiddle.net/0fo31d25/
Your Environment
Version used: 2.0.3-alpha
Browser Name and version: Firefox 119.0.1
Operating System and version (desktop or mobile): Windows 11
The text was updated successfully, but these errors were encountered:
Before submitting...
Context
I've been trying to convert a project from materializecss 1.0 to 2.0, but it doesn't seem like html tooltips are working. This may be because I am dynamically generating both the tooltip trigger and content elements, but I'm still calling
M.Tooltip.init
on the tooltip triggers after generating the new elements (and have confirmed that the elements exists at the time that method is invoked).Current Behavior
It appears that using the
data-tooltip-id
attribute on tooltip triggers does not actually allow for HTML in tooltips. The tooltips appear, but they are empty.Expected behavior
The html from the specified content elements should display.
Possible Solutions or Causes
I don't really know exactly what would be causing it, but I did see that the docs are somewhat out of date related to the removal of the unsafeHTML option. I'm not using that option, but it seems possible that removal of that option also did something to break the
data-tooltip-id
method of html in tooltips.Steps to reproduce
I copy and pasted the example code from the docs into this jsfiddle, and it shows the same issue:
https://jsfiddle.net/0fo31d25/
Your Environment
The text was updated successfully, but these errors were encountered: