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

Bug: Detached node memory leak when using key and focus contenteditable element #25772

Closed
TUTOR03 opened this issue Dec 1, 2022 · 3 comments
Closed
Labels
Resolution: Stale Automatically closed due to inactivity Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@TUTOR03
Copy link

TUTOR03 commented Dec 1, 2022

The DOM node stays in memory as a detached node if it has a content editable element inside what is focused using ref and that component is used with key prop in parent.

React version: 18.2.0, 17.0.2

Steps To Reproduce

All steps to reproduce are written in README file for this repo.
Also there is a source code to reproduce the bug.

The current behavior

The DOM node stays in memory as a detached node and can not be collected with garbage collector.

The expected behavior

The DOM node doesn't stay in memory as a detached node.

Copy link

github-actions bot commented Apr 9, 2024

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Apr 9, 2024
Copy link

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 17, 2024
@VMBindraban
Copy link

Screenshot 2024-04-19 at 10 25 52 AM

I runned the performance profiler for a minute and while the JSHeap is being cleaned up the nodes keeps on rising.
The app repaints between the 1 and 3 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Stale Automatically closed due to inactivity Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

2 participants