Skip to content

select with spread doesn't work normally #6873

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

Closed
01oseluiz opened this issue Oct 22, 2021 · 3 comments
Closed

select with spread doesn't work normally #6873

01oseluiz opened this issue Oct 22, 2021 · 3 comments

Comments

@01oseluiz
Copy link

Describe the bug

The attribute 'selected' of the tag 'option' doesn't work if 'select' tag has spread.
This happens from version 3.42.1 (works here) to 3.42.2 (doesn't works here)

Reproduction

REPL 3.42.2

REPL 3.42.1

Logs

No response

System Info

Tested with chrome using the REPL
  
System:
    OS: Windows 10 10.0.19043
    CPU: (4) x64 Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz
    Memory: 3.05 GB / 15.89 GB
  Binaries:
    Node: 12.14.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 94.0.4606.81
    Edge: Spartan (44.19041.1266.0), Chromium (94.0.992.50)
    Internet Explorer: 11.0.19041.1202

Severity

blocking an upgrade

@Prinzhorn
Copy link
Contributor

Another edge case along this line:

#6126
#6675

RaiVaibhav added a commit to RaiVaibhav/svelte that referenced this issue Oct 22, 2021
This add the selected attr to the dom element
and later using the hasAttribute it check if any
of the option have selected atrribute then don't set
selectedIndex to -1, this way it avoid setting the
selectedIndex on mount

Fixes: sveltejs#6873
RaiVaibhav added a commit to RaiVaibhav/svelte that referenced this issue Oct 22, 2021
This add the selected attr to the dom element
and later using the hasAttribute it check if any
of the option have selected atrribute then don't set
selectedIndex to -1, this way it avoid setting the
selectedIndex on mount

Fixes: sveltejs#6873
@dummdidumm
Copy link
Member

Fixed by #8371

@theodorejb
Copy link
Contributor

Actually I believe this was fixed by #8329. It's already working in v3.56.0: https://svelte.dev/repl/bf2f91391e01472092f3db8c2de94bdc?version=3.56.0

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 a pull request may close this issue.

4 participants