-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Svelte 5: Bug - $state is not properly updated when another $state is modified inside class #11160
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
Comments
This should be relative to the fact that you are adding an |
I think that make sense, this mean I don't need bind:value at all? I can do something like this ? What seems weird to me is that it works in firefox and not in chrome, and moving function |
I've investigated a bit further and apparently the bug happens when you modify (inside the oninput) the same property that you are returning next to it (in this case |
Looks related to #11138. |
Describe the bug
I am trying to create a form validator, and I encountered a bug when it does not change the $state of
values
on the first keypress inside<CustomInput/>
This is smallest code that reproduce that bug:
Things I found:
getProps()
outsideForm
class.Reproduction
https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAA6VTTWvbQBD9K4-lIBmEfFckQwkEcik55RLloMjjeKm0K3ZHNkXov5fZVWS77qFQdNHsm48382YmddAdeVW8Tco0PalCfR8GlSn-NYjhT9QxqUx5O7pWXkrfOj3wrjaA7gfrGI-jZ9s_m2FkHJztkeTbYOUxPHmojbi3XeM9nqzrMYkNnJpuJI8K3zw3TOk0bx4iQs5Zd4fUXHPEW2s8u7Fl69IJ2mjWTfca082br_wAH7XP1zI3fkulOZIDPolfnB18KoO4SuGIR2cuNmCNlvYKpLRBtRMoMAtfqBjpv0mmd1Solbc98VGbz1pd8szZ5T9EFLiLXl3mC9-VdEeMg8yzgqFzGG268LxptcAEyVYgSZaqYZ7ldlWzHIKkT9p5RntsXNMyOWgPYxmyDntog9i4RIp_bcpr8Yeuaelouz25qlYRiRG1woc2-yIoUU3CeVElF14zpjzPw-uqQiJAspmxXdk9M87W_fQ4az7CNKxP9AejUv-FyY8rz_9lUhuVqd7u9UHTXhXsRpqz9XjCHP7hfLD7ku_6EmTdhVzz0VG6yeJWhWVYtiDPc0eeBZjFeQj8ws3cihmncGk0dCWh0sR9A-_zb84yRwEJBAAA
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: