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

Selected <select> value disappears in svelte 3.42.2 #6675

Closed
icalvin102 opened this issue Aug 23, 2021 · 3 comments · Fixed by #6687
Closed

Selected <select> value disappears in svelte 3.42.2 #6675

icalvin102 opened this issue Aug 23, 2021 · 3 comments · Fixed by #6687
Labels
bug compiler Changes relating to the compiler

Comments

@icalvin102
Copy link

icalvin102 commented Aug 23, 2021

Describe the bug

<select> elements that should have a selected option appear blank after the update to 3.42.2

This only happens (to me at least) if the select is inside a component that has store props passed to it.

I am aware of the change proposed in #6126 and implemented by #6170 but it seems that this is not the root cause of this issue but rather brings to light a underlying problem.

I have tried adding console.log(value) to select_option function in svelte/src/runtime/internal/dom.ts#L536
and It logged undefined with the code shown in the REPL.

Reproduction

https://svelte.dev/repl/6ab9575cda57439a83652811ecfd7d8c?version=3.42.2

Logs

No response

System Info

Brave Version 1.26.74 Chromium: 91.0.4472.124 (Official Build) (64-bit) on Arch Linux

Severity

blocking an upgrade

@jakob-kruse
Copy link

I just randomly stumbled across this. The disappearing stops once you remove {...$restProps}. Maybe this helps in some way

@dummdidumm dummdidumm added bug compiler Changes relating to the compiler labels Aug 24, 2021
@baseballyama
Copy link
Member

Sorry for the wrong mention.
Please ignore the mentioned.

@Conduitry
Copy link
Member

This should be fixed in 3.42.4 - https://svelte.dev/repl/6ab9575cda57439a83652811ecfd7d8c?version=3.42.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug compiler Changes relating to the compiler
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants