Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

No tooltips are shown (since new were added) #1156

Open
WesleyWas opened this issue Jan 25, 2024 · 1 comment
Open

No tooltips are shown (since new were added) #1156

WesleyWas opened this issue Jan 25, 2024 · 1 comment

Comments

@WesleyWas
Copy link

Bug description

Since I added more tooltips on my Webflow page today, it seems like none of them are working anymore.
I'm using TippyJS to create the tooltips based on their attribute data-tippy-content.

Troubleshooting

The HTML elements seem to have the attribute attached, so the issue is not coming from here.

Screenshot 2024-01-25 at 6 38 47 in the evening

It also seems when I run the command in the console that it finds the elements:

Screenshot 2024-01-25 at 6 39 03 in the evening

There is also no console error from Tippy.

Reproduction

You can troubleshot the issue live here: https://flusk-test.webflow.io/pricing

Here's the code before the tag of my Webflow page:

<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/tippy.js@6"></script>
<script>
tippy('[data-tippy-content]', {        
 animation: 'fade',    
 duration: 400,      
 arrow: true,          
 delay: [0, 50],      
 arrowType: 'large',  
 theme: 'custom-material', // background-color
 maxWidth: 300,    
 interactive: true,
 trigger: 'hover',  
 hideOnClick: false,
})
</script>

But also tried loading after the DOM:


<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/tippy.js@6"></script>
<script>
  document.addEventListener('DOMContentLoaded', function() {
    tippy('[data-tippy-content]', {        
      animation: 'fade',    
      duration: 400,      
      arrow: true,          
      delay: [0, 50],      
      arrowType: 'large',  
      theme: 'custom-material', // background-color
      maxWidth: 300,    
      interactive: true,
      trigger: 'hover',  
      hideOnClick: false,
    });
  });
</script>
@tanin47
Copy link

tanin47 commented Apr 2, 2024

I encountered the same issue. The solution is to append to the parent instead with:

<script>tippy('[data-tippy-content]', {appendTo: 'parent'})</script>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants