Skip to content

Fix GSAP animations and filter buttons broken after client-side navigation#18

Open
HerrMotz with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-gsap-navigation-issue
Open

Fix GSAP animations and filter buttons broken after client-side navigation#18
HerrMotz with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-gsap-navigation-issue

Conversation

Copilot AI commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

DOMContentLoaded only fires on hard page loads. With Astro's ClientRouter (View Transitions) doing DOM swaps, GSAP entrance animations and filter button listeners were never re-initialized on subsequent navigations.

Changes

  • 4 files: replace document.addEventListener('DOMContentLoaded', ...)document.addEventListener('astro:page-load', ...) in:
    • src/pages/team/index.astro
    • src/pages/blog/index.astro
    • src/pages/publications/index.astro
    • src/components/Landing/Blog.astro
- document.addEventListener('DOMContentLoaded', () => {
+ document.addEventListener('astro:page-load', () => {

astro:page-load fires on both initial load and after every View Transition — the pattern already used correctly in NavBar.astro and Hero.astro.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/hisqu.github.io/hisqu.github.io/node_modules/.bin/astro build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>After page navigation GSAP does not work</issue_title>
<issue_description>### Aufgabe

Image

When I try to click one of the filter buttons there is no response. This is the same on the main page as well, so this seems to be a general issue of how GSAP is used.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@HerrMotz
HerrMotz marked this pull request as ready for review February 21, 2026 18:17
…with astro:page-load

Co-authored-by: HerrMotz <20333692+HerrMotz@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix GSAP not working after page navigation Fix GSAP animations and filter buttons broken after client-side navigation Feb 21, 2026
Copilot AI requested a review from HerrMotz February 21, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After page navigation GSAP does not work

2 participants