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

Tooltip: The Tooltip component has a memory leak. #5629

Closed
ajon88 opened this issue Apr 22, 2024 · 3 comments
Closed

Tooltip: The Tooltip component has a memory leak. #5629

ajon88 opened this issue Apr 22, 2024 · 3 comments
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted

Comments

@ajon88
Copy link

ajon88 commented Apr 22, 2024

Describe the bug

After displaying the tooltip, the resize event was not triggered, causing the window.removeEventListener to not be executed.
The removeEventListener will only execute and release memory altogether after the browser window size changes.

tooltip.js line:190 in tooltipActions()
...
window.addEventListener('resize', function onWindowResize() {
if (!utils.DomHandler.isTouchDevice()) {
$this.hide(el);
}
window.removeEventListener('resize', onWindowResize);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
});

Reproducer

none

PrimeVue version

3.49.1

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

Chrome

Steps to reproduce the behavior

as described

Expected behavior

Execute removeEventListener at the appropriate time to avoid memory leaks.

@ajon88 ajon88 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 22, 2024
@DrJonki
Copy link

DrJonki commented Jun 9, 2024

Due to this problem we cannot use tooltips. In many occasions this issue has caused our application to grind to a halt. What's worse is that it takes a while of runtime for the issue to become apparent.

@tugcekucukoglu
Copy link
Member

Please track this issue: #5856

@tugcekucukoglu tugcekucukoglu added Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 19, 2025
Copy link

This issue has been marked as a duplicate and has been closed. Please refer to the original issue for updates. Thank you!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted
Projects
None yet
Development

No branches or pull requests

3 participants