Comments (5)
@marttheis As far as I know, when Livewire navigates and loads the new pages HTML, it will reinitialise Alpine and therefore the plugin should reinitialise too.
I believe the only exception to this is if the element is being persisted across pages.
from alpine-tooltip.
I was able to narrow it down a bit. When navigating to the exact url where the toolip is located, it works for continued navigation and everything is fine. However when I land on a URL without the tooltip and then navigate to the URL with the tooltip, it doesn't work because something was not initialized it seems. After a refresh on a page with a tooltips it works.
Maybe it messed up the x-data. I was not able to make the html links work with x-text="message", hence I skipped it and put it directly into the template. Is that correct?
<div class=" padbot flex justify-between items-baseline w-full ">
<div x-data="{ message: '' }" class=" text-tpri h2 flex ">Your notifications
<template x-ref="template">
<p>Real time statistics of your portfolio. <a rel="noreferrer noopener" class="dont-break-out hover:underline text-p1" target="_blank" href="../documentation#docs1"> documentationofyourdocumentationstuffforyoutolearnmoreabout</a> Real time statistics Real time statistics of your portfolio. of your portfolio. Learn more in our <a rel="noreferrer noopener" class="dont-break-out hover:underline text-p1" target="_blank" href="../documentation#docs1"> documentation of your documentation stuff for you to learn more about</a></p>
</template>
<button ontouchstart:passive x-tooltip.interactive.debounce.200 x-tooltip="{content: () => $refs.template.innerHTML, allowHTML: true, theme: 'custom', placement: 'auto', inlinePositioning: false, appendTo: $root, interactive: true }" class=" padx text-tsecinv h2 flex justify-center items-center active:text-tpri hover:text-tpri ">
<svg class=" h-5 " height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" ><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>
</button>
</div>
from alpine-tooltip.
I solved the isssue.
I have two main layouts. I only loaded the styles and css on one of them. Whenever I initially loaded the one without and navigated to the one with the styles and css it obviously needed a refresh.
from alpine-tooltip.
The button element has 2 separate tooltip directives, that'll likely be a problem.
from alpine-tooltip.
That wasn't the reason but thank you for pointing it out. I will get rid of the tippy syntax and add the debounce into the other one.
from alpine-tooltip.
Related Issues (20)
- How to use multiple modifiers simultaneously? HOT 2
- Use tooltip as basis for a guided tour
- Themes HOT 2
- Html content HOT 2
- Add `$tooltip` magic variable HOT 2
- NPM package magic $tooltip missing HOT 2
- $tooltip not working with CDN? HOT 1
- How to use $tooltip in Fullcalendar 5 HOT 1
- Dynamic HTML content HOT 3
- Always show tooltip HOT 1
- change background to white HOT 3
- The tooltip does not appear HOT 8
- Not a bug report: Load content through ajax request HOT 1
- Possible to set Popper's flip modifier?
- Define theme globally HOT 8
- Tippy dependency confusion HOT 4
- Viewport overflow issues HOT 3
- Custom theme not working HOT 1
- Tooltip text disappearing on parent x-data updates
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alpine-tooltip.