-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
Documentation says:
Since 5.6.0, if an
<input>has a defaultValue, it will revert to that value instead of the empty string when the form is reset. Note that for the initial render the value of the binding takes precedence unless it is null or undefined.
https://svelte.dev/docs/svelte/bind#input-bind:value
But if the initial value of the binding is null nothing is happening.
Reproduction
- open demo from day 4 of Advent of svelte: https://svelte.dev/playground/b30cfac16c3c4a3ab3d76ad20a5925cf?version=5.6.1
- set the initial value of
wishlistto null
Logs
No response
System Info
System:
OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1255U
Memory: 3.40 GB / 15.33 GB
Container: Yes
Shell: 5.2.32 - /nix/store/qqz0gj9iaidabp7g34r2fb9mds6ahk8i-bash-interactive-5.2p32/bin/bash
Binaries:
Node: 22.9.0 - /nix/store/f9yl8nlgcyazflxc2nj1cr9k9ika7v7z-nodejs-22.9.0/bin/node
npm: 10.8.3 - /nix/store/f9yl8nlgcyazflxc2nj1cr9k9ika7v7z-nodejs-22.9.0/bin/npm
pnpm: 9.7.1 - /nix/store/0dvag1syzkbzrjdpppabnkws2vki5wr3-corepack-nodejs-22.9.0/bin/pnpm
Browsers:
Chrome: 131.0.6778.85Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels