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

<option> outside of <select> throws error #1022

Closed
taylorzane opened this issue Dec 13, 2017 · 2 comments · Fixed by #1048
Closed

<option> outside of <select> throws error #1022

taylorzane opened this issue Dec 13, 2017 · 2 comments · Fixed by #1048
Labels

Comments

@taylorzane
Copy link
Contributor

Using svelte 1.47.2 and 1.45.0.

REPL: https://svelte.technology/repl?version=1.47.2&gist=7d15de2a904b723c8c0395a1dee35df8

When an <option> element is not contained in a <select> (or any element for that matter), it throws an error as the special handling for <option> elements expects the parent to be a <select>. While there are few use cases for an option outside of a select, my use case is one where the option element needs its own component space for state subscription purposes.

@taylorzane
Copy link
Contributor Author

Interesting, this doesn't happen in 1.44.0: https://svelte.technology/repl?version=1.44.0&gist=d6fadd5e8b755b8d0fb7301d61a727c7

@Rich-Harris
Copy link
Member

fixed in 1.49.3, thanks

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

Successfully merging a pull request may close this issue.

2 participants