-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Labels
Comments
Interesting, this doesn't happen in 1.44.0: https://svelte.technology/repl?version=1.44.0&gist=d6fadd5e8b755b8d0fb7301d61a727c7 |
Rich-Harris
added a commit
that referenced
this issue
Dec 24, 2017
Rich-Harris
added a commit
that referenced
this issue
Dec 24, 2017
allow options outside <select> elements
fixed in 1.49.3, thanks |
sacrosanctic
pushed a commit
to sacrosanctic/svelte
that referenced
this issue
Dec 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.The text was updated successfully, but these errors were encountered: