Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with setting the same transition name on multiple nodes #43

Open
AlaaMX opened this issue Nov 12, 2024 · 2 comments
Open

Issue with setting the same transition name on multiple nodes #43

AlaaMX opened this issue Nov 12, 2024 · 2 comments

Comments

@AlaaMX
Copy link

AlaaMX commented Nov 12, 2024

Hello, I'm encountering an issue when trying to set the same view-transition-name on multiple nodes. When I apply the same transition name to multiple elements, the transition stops working. I am forced to create separate transition names for each node, even if the animation is identical.

Has anyone else faced this issue or can provide a solution?

@kevinmatr
Copy link

According to the Web Doc, perhaps you shouldn't have 2 element with the same transition name together on a page

An identifying name that causes the selected element to participate in a separate view transition from the root view transition. The identifier must be unique. If two rendered elements have the same view-transition-name at the same time, ViewTransition.ready will reject and the transition will be skipped.

But I found that the transition stops working even when they are located in different page.
The strange thing is when calling the browser's back action, the transition miraculously appears 🤨

@AlaaMX
Copy link
Author

AlaaMX commented Dec 19, 2024

According to the Web Doc, perhaps you shouldn't have 2 element with the same transition name together on a page

An identifying name that causes the selected element to participate in a separate view transition from the root view transition. The identifier must be unique. If two rendered elements have the same view-transition-name at the same time, ViewTransition.ready will reject and the transition will be skipped.

But I found that the transition stops working even when they are located in different page. The strange thing is when calling the browser's back action, the transition miraculously appears 🤨

Hey, thanks for the heads up. It seems like a questionable specification if it's official, as it forces people to duplicate the same code. Anyway...

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

No branches or pull requests

2 participants