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

File input binding fails if type declared last #3828

Closed
Rich-Harris opened this issue Oct 31, 2019 · 2 comments · Fixed by #3849
Closed

File input binding fails if type declared last #3828

Rich-Harris opened this issue Oct 31, 2019 · 2 comments · Fixed by #3849
Labels

Comments

@Rich-Harris
Copy link
Member

Describe the bug
<input type=file bind:files> works. <input bind:files type=file> doesn't. Via Stack Overflow

Logs

Value being assigned to HTMLInputElement.files does not implement interface FileList.

To Reproduce
https://svelte.dev/repl/b07ef4b35880412ea63683c1d33947b5?version=3.12.1

Expected behavior
Svelte shouldn't attempt to assign to input.files

Severity
Low, as it's easily worked around

@quantuminformation
Copy link
Contributor

This is the diff in the output code:
Screenshot 2019-11-02 at 14 34 15

@fweth
Copy link

fweth commented Apr 4, 2022

<input type="range" value={0.5} max={1} step={1}/> also gives a different result (value evaluates to 1 as step is 1 by default and value was set before step) than <input type="range" step={1} max={1} value={0.5}/>, is this intended?

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.

3 participants