Skip to content

Commit ab0ec6f

Browse files
committed
don't update a focused input (may need to add a blur handler later, we'll see)
1 parent 94a4b11 commit ab0ec6f

File tree

1 file changed

+4
-0
lines changed
  • packages/svelte/src/internal/client/dom/elements/bindings

1 file changed

+4
-0
lines changed

packages/svelte/src/internal/client/dom/elements/bindings/input.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ export function bind_value(input, get, set = get) {
6464

6565
var value = get();
6666

67+
if (input === document.activeElement) {
68+
return;
69+
}
70+
6771
if (is_numberlike_input(input) && value === to_number(input.value)) {
6872
// handles 0 vs 00 case (see https://github.com/sveltejs/svelte/issues/9959)
6973
return;

0 commit comments

Comments
 (0)