ElemeFE / ElemeFE/element

[Bug Report] Memory leak at el-tooltip cleanup

Open
#19,370 3 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Element UI version
0.1.0

### OS/Browsers version
All

### Vue version
3.0.0-beta.10

### Reproduction Link
https://github.com/ElemeFE/element/blob/dev/packages/tooltip/src/main.js

### Steps to reproduce
Traced a memory leak to this to the code:
https://github.com/ElemeFE/element/blob/dev/packages/tooltip/src/main.js

in the mounted there is a 'focus' event listener registered to lambda. In the destroyed we try to to clean it by referencing 'this.handleFocus' but that is not the function that is bound to the event.

### What is Expected?
The component event listener should be cleaned up properly.

### What is actually happening?
Event is not cleaned up and we leak memory.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.