Skip to content

fix(ssr): revert change that causes css animations in nextjs to play twice - #6537

Closed
OS-jacobbell wants to merge 2 commits into
mainfrom
fix-ssr-animations
Closed

fix(ssr): revert change that causes css animations in nextjs to play twice#6537
OS-jacobbell wants to merge 2 commits into
mainfrom
fix-ssr-animations

Conversation

@OS-jacobbell

Copy link
Copy Markdown
Contributor

What is the current behavior?

In 4.35.2 (#6311) there was a regression that causes CSS animations to restart when an SSR page is hydrated in Next.js dev mode using runtime-based SSR.

GitHub Issue Number: N/A

What is the new behavior?

CSS animations only play once.

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Testing

Manually tested.

Other information

@OS-jacobbell
OS-jacobbell requested a review from a team as a code owner January 9, 2026 17:25
@johnjenkins

Copy link
Copy Markdown
Contributor

hey! There was definitely a reason for that.... although I obvs didn't add a test for it :/
I think it was the line on 126?

@johnjenkins

Copy link
Copy Markdown
Contributor

Perhaps you could use node.isConnected to stop it from being re-added?

@OS-jacobbell

Copy link
Copy Markdown
Contributor Author

Like this on line 273?
if (node && !node.isConnected) {

@johnjenkins

Copy link
Copy Markdown
Contributor

Yh exactly

@johnjenkins

Copy link
Copy Markdown
Contributor

Ah yeah. Won’t work as the nodes are already connected. Lemme have a think

@johnjenkins

Copy link
Copy Markdown
Contributor

@OS-jacobbell - I think this #6540 should be safe?
Feel free to edit it or copy it to this and I'll close that one

@OS-jacobbell

Copy link
Copy Markdown
Contributor Author

Let's close this PR and merge yours.

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.

2 participants