-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix: double event processing in Firefox (#16522) #16527
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Firefox seems to garbage collect event objects during event propagation if no global reference to the event object is kept. That discards the __root marker set on the event object to early, leading to duplicate processing.
🦋 Changeset detectedLatest commit: 4edbbfc The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Thanks! |
Is it me, or the fix doesn't work at all? I guess |
Oh, it worked for me locally but you are right that it seems to be treeshaken |
fyi - Mozilla acknowledged the severity of the bug in Firefox and prepared a PR to fix it in the current stable release. It was initially classified as a normal (S3) issue to be addressed in the next version, but after realizing it was breaking Svelte and directly impacting our business app with a concrete example, they raised the priority to S2 and work to deliver a fix for the current version. Meanwhile, thanks to svelte amazing team for being that reactive with some magic work-arounds that made the trick for us ! |
Firefox seems to garbage collect event objects during event propagation if no global/shared reference to the event object is kept between multiple event handlers. That discards the
__root
marker set on the event object to early, leading to duplicate processing.I am not sure what is a good way to test this.
Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.packages/svelte/src
, add a changeset (npx changeset
).Tests and linting
pnpm test
and lint the project withpnpm lint