Skip to content

Conversation

@Rich-Harris
Copy link
Member

This was added in #14194 but I have no idea why — there are no tests, no comments, and I can't discern any difference in the behaviour of the repro in #14186 without it. There is a difference between 5.1.11 and latest, but removing this stuff doesn't seem to cause a regression, at least not locally (we'll see what happens when the playground link is added here).

What is it for @trueadm?

@changeset-bot
Copy link

changeset-bot bot commented Dec 2, 2024

⚠️ No Changeset found

Latest commit: 9348f55

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2024

Playground

pnpm add https://pkg.pr.new/svelte@14511

@Rich-Harris
Copy link
Member Author

Here's the repro with this PR — note that it doesn't exhibit the incorrect warnings seen in the original repro

@Rich-Harris Rich-Harris changed the title remove without_reactive_context chore: remove without_reactive_context Dec 2, 2024
@trueadm
Copy link
Contributor

trueadm commented Dec 2, 2024

This was added to prevent our binding events from being within a reactive context. If someone were to dispatch an event our event system removes the reactive context for events like oninput but that was never happening for bound events as we manually add the event listeners using addEventListener. Meaning that if someone were to invoke the bindings manually, with dispatchEvent then there would be issues.

I can come up with a failing test case tomorrow.

@Rich-Harris Rich-Harris closed this Dec 3, 2024
@dummdidumm dummdidumm deleted the remove-without-reactive-context branch April 22, 2025 09:31
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.

3 participants