-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
discussionknown issueThe issue is known and may be left as-is.The issue is known and may be left as-is.
Description
- Check if updating to the latest Preact version resolves the issue
Describe the bug
The onLoad listener for <img /> isn't removed after <img /> unmount.
timeline:
img mount -> start loading image -> img unmount -> finish loading image -> onLoad fires
Steps to reproduce the behavior:
- Keep refresh the page, and at some time the
imgRef === null, which means whenonLoadfires,<img />is already unmounted
Expected behavior
all listeners (including onLoad) should be removed or not fired after unmount
Metadata
Metadata
Assignees
Labels
discussionknown issueThe issue is known and may be left as-is.The issue is known and may be left as-is.