You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
<select> displays wrong choice when options are dynamically updated #17148
If a <select> is bound to a state not equal to the initial value and its options are updated, the element will snap to display the initial value that does not match the state variable. This issue was introduced in 5.41.0, it does not occur in 5.40.2.
This is a severe regression bug introduced with version 5.41 which is producing a lot of irritation and problems without a clear workaround to mitigate. It is currently a blocking problem for us as well.
I think the problem was probably introduced by this commit: #16958
from @Rich-Harris
If the Options-List is updated while the select is the active Element the update is skipped. But if the option list changes the update is neccessary, even if the select has focus, since it needs to update to display the value correctly.
Activity
falco467 commentedon Feb 9, 2026
This is a severe regression bug introduced with version 5.41 which is producing a lot of irritation and problems without a clear workaround to mitigate. It is currently a blocking problem for us as well.
falco467 commentedon Feb 9, 2026
I think the problem was probably introduced by this commit:
#16958
from @Rich-Harris
If the Options-List is updated while the select is the active Element the update is skipped. But if the option list changes the update is neccessary, even if the select has focus, since it needs to update to display the value correctly.
fix: keep select.__value current when effect is deferred (sveltejs#17148
fix: keep select.__value current when effect is deferred (#17745)