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

chore: remove without_reactive_context #14511

Closed
wants to merge 2 commits into from

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?

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

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.

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