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

Detached DOM nodes are retained when transition of multiple values is cancelled #7326

Open
c99pjn opened this issue Nov 6, 2024 · 0 comments

Comments

@c99pjn
Copy link

c99pjn commented Nov 6, 2024

Provide a general summary of the issue here

I noticed while while taking memory snapshots that some detached nodes where retained by runAfterTransition.ts.

🤔 Expected Behavior?

transitionsByElement should not retain any reference to nodes that have been removed from the DOM.

😯 Current Behavior

When a node with multiple transitions in progress is removed from the DOM a reference to it is still kept in transitionsByElement.

I think the problem is here. Only the first transitioncancel event is listened for and since there are still tracked transitions on the node it is not removed.

💁 Possible Solution

Potentially don't setup the transitioncancel event listener with once: true

🔦 Context

No response

🖥️ Steps to Reproduce

I'm not sure how to replicate this in a sandbox.

Version

3.35.0

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

OSX

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

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

1 participant