Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid chromium issue with dispatching blur on element removal #13694

Merged
merged 5 commits into from
Oct 19, 2024

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Oct 19, 2024

Glad we found this now! Addresses the issue found in #13684 (comment) which is unrelated to block effects but rather a bug in Chromium https://chromestatus.com/feature/5128696823545856. This doesn't happen in any other browser engine.

Copy link

changeset-bot bot commented Oct 19, 2024

🦋 Changeset detected

Latest commit: 212a068

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

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

@dummdidumm
Copy link
Member

What is the consequence of a blur event setting state when there's no active reaction? Does it have any consequences other than not throwing that validation error?

@trueadm
Copy link
Contributor Author

trueadm commented Oct 19, 2024

@dummdidumm There are three bugs that can come out of this by having the wrong active_reaction.

  1. the blur event handler reads state, causing the reaction to get a dependency when it shouldn't, leading to odd behaviour as things are now dependencies when they shouldn't be
  2. the blur event triggers a state change, however the current reaction doesn't allow that leading to a mutation error, or a possible infinite updates if it's already been read in 1)
  3. the event handler creates an effect, or derived and now they're owned by the wrong thing

@trueadm trueadm merged commit bb491f1 into main Oct 19, 2024
9 checks passed
@trueadm trueadm deleted the fix-chromium-bug branch October 19, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants