Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix window scroll handler leaks#643

Open
hkhere wants to merge 1 commit into
michalsnik:next from
hkhere:fix-handler-leaks
Open

fix window scroll handler leaks #643
hkhere wants to merge 1 commit into
michalsnik:next from
hkhere:fix-handler-leaks

Conversation

@hkhere

@hkhere hkhere commented Nov 28, 2020

Copy link
Copy Markdown

Related Issue

The window's scroll handler is not removed when a new scroll handler is to be installed.

This does not only leak handlers but also causes accumulated scroll handlers to be executed every time the scroll event is fired.

Your solution

remove current scroll handler when a new scroll handler is to be installed

hkhere commented Nov 28, 2020

Copy link
Copy Markdown
Author

This can be easily verified using getEventListeners(window) in devtools and examine the scroll property of the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /