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

Files binding does not trigger on init #15054

Closed
TGlide opened this issue Jan 18, 2025 · 0 comments · Fixed by #15059
Closed

Files binding does not trigger on init #15054

TGlide opened this issue Jan 18, 2025 · 0 comments · Fixed by #15059

Comments

@TGlide
Copy link
Member

TGlide commented Jan 18, 2025

Describe the bug

When using an input with type="file", if you choose a file, and then reload the page, the input still has the file selected. However, if you're using bind:files in svelte, the files variable will not be populated with said files. It is only populated on change.

Reproduction

https://github.com/TGlide/svelte-files-repro

Logs

System Info

System:
    OS: Linux 6.6 cpe:/o:nixos:nixos:24.11 24.11 (Vicuna)
    CPU: (32) x64 AMD Ryzen 9 7950X3D 16-Core Processor
    Memory: 50.74 GB / 62.01 GB
    Container: Yes
    Shell: 3.7.1 - /run/current-system/sw/bin/fish
  Binaries:
    Node: 20.18.1 - /run/current-system/sw/bin/node
    npm: 10.8.2 - /run/current-system/sw/bin/npm
    pnpm: 9.15.3 - /run/current-system/sw/bin/pnpm
  npmPackages:
    svelte: ^5.0.0 => 5.19.0

Severity

annoyance

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.

1 participant