Skip to content

Commit 0aa9d48

Browse files
committed
Fix textarea focus delay in Textarea.svelte
Modified the textarea component to import 'tick' from Svelte for future potential asynchronous operations, though not yet used in this snippet. Increased the delay in the focus timeout from 0 to 100 milliseconds to ensure the textarea element is rendered before trying to focus it. This addresses issues with timing and focuses behavior in the UI component.
1 parent 4cdc339 commit 0aa9d48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/ui/src/lib/Textarea.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
// set time out to ensure the element is rendered
7676
setTimeout(() => {
7777
textBoxEl?.focus();
78-
}, 0);
78+
}, 100);
7979
}
8080
});
8181

0 commit comments

Comments
 (0)