[Bug Report][3.9.4] Memory leak in Touch directive
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 41k
- Forks
- 7.1k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 11
Description
Environment
Vuetify Version: 3.9.4
Vue Version: 3.5.18
Browsers: Google Chrome
OS: Windows 10
Steps to reproduce
- Dev Tool snapshots
- Toggle v-window
- Dev Tool snapshots
- compare result
Expected Behavior
Touch directive event listeners is clear as expected
Actual Behavior
Event Listeners cannot be clear
Reproduction Link
https://play.vuetifyjs.com/#...
Other comments
- if we set the
parentto true ofTouchdirective, the parent will always be null in unmount(vue3)/unbind(vue2) which means we may use weakRef or something record the parentElement
- the params of removeEventListeners should always be equal to addEventListeners
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with packages/vuetify/src/directives/touch/index.ts, especially the referenced lifecycle and removeEventListeners lines. Reproduce the issue in the linked Vuetify Playground by toggling v-window and comparing Chrome DevTools snapshots. Trace whether unmount/unbind retains the parent and whether removal receives the same parameters as registration; done means Touch event listeners are cleared and no longer accumulate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100