Skip to content

Commit b824473

Browse files
committed
add comment
1 parent b44bd67 commit b824473

File tree

1 file changed

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

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ export function bind_value(input, get, set = get) {
6565
var value = get();
6666

6767
if (input === document.activeElement) {
68+
// Never rewrite the contents of a focused input. We can get here if, for example,
69+
// an update is deferred because of async work depending on the input:
70+
//
71+
// <input bind:value={query}>
72+
// <p>{await find(query)}</p>
6873
return;
6974
}
7075

0 commit comments

Comments
 (0)