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 added some click eventListener to navigation bar. After enabling ViewTransition, the click listener works only on first page load, after navigating to another page, I lost the click event on those elements.
What's the expected result?
If I add el.addEventListener('click', someFunc) to some elements, and those elements are in DOM even after navigating to other pages, the event should still work.
What version of
astro
are you using?2.10.1
Are you using an SSR adapter? If so, which one?
Node
What package manager are you using?
npm
What operating system are you using?
Mac
What browser are you using?
Chrome
Describe the Bug
I added some click eventListener to navigation bar. After enabling ViewTransition, the click listener works only on first page load, after navigating to another page, I lost the click event on those elements.
What's the expected result?
If I add el.addEventListener('click', someFunc) to some elements, and those elements are in DOM even after navigating to other pages, the event should still work.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-stfdbe-97paz7?file=src%2Fpages%2Findex.astro,src%2Fpages%2Ftwo.astro,src%2Fcomponents%2FLayout.astro
Participation
The text was updated successfully, but these errors were encountered: