-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
There is updating issue in input[type="range"]
.
let object = { value: 1, };
$: console.log('update', object);
function _input(e) {
console.log(`--- input type: ${e.target.type} ---`)
}
<input type="number" bind:value={option.value} on:input={_input} />
<input type="range" bind:value={option.value} on:input={_input} />
-
When we change value in
input[type=number]
The console will trigger once
-
But when we change value in
input[type=range]
The console will trigger twice
Thhere is something strange with input[type=range].
If we bind value
directly, there is no duplicated-trigger issue.
and this issue only exists on svelte v4, svelte v5 works fine.
Reproduction
Svelte v4
https://svelte.dev/repl/1370f63ba12b4007ba975de9c935d6c0?version=4.2.12
Logs
No response
System Info
### Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels