Reproduction of issue in this REPL: https://svelte.technology/repl?version=1.20.2&gist=348577339ab2e03462b1279b38d9975b
This issue occurs when using a bound value and the on:change event for an <input type="number"> element.
- What I did: enter a value in the input element, kill focus by clicking away, clear contents of input element, kill focus by clicking away.
- What happens: the first value shows up as the bound value and the event value as expected, but after clearing the input element and killing focus, the bound value is
0 while the event value is "".
- What I expect to happen: when an input element is cleared, the emitted
on:change event value should allow for the empty string, and not coerce the value to 0.
Reproduction of issue in this REPL: https://svelte.technology/repl?version=1.20.2&gist=348577339ab2e03462b1279b38d9975b
This issue occurs when using a bound value and the
on:changeevent for an<input type="number">element.0while the event value is"".on:changeevent value should allow for the empty string, and not coerce the value to0.