From 9f27c3c1ab03fa9f2e08fc30bae06afc271a9032 Mon Sep 17 00:00:00 2001 From: Ross Edfort Date: Thu, 31 Aug 2023 16:25:58 -0600 Subject: [PATCH] focus and select text in combobox when list is opened (#1610) --- src/lib/holocene/combobox/combobox.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/holocene/combobox/combobox.svelte b/src/lib/holocene/combobox/combobox.svelte index 45fb42f02..8f96ce25e 100644 --- a/src/lib/holocene/combobox/combobox.svelte +++ b/src/lib/holocene/combobox/combobox.svelte @@ -113,12 +113,13 @@ closeList(); } else { openList(); - inputElement.focus(); } }; const openList = () => { $open = true; + inputElement.focus(); + inputElement.select(); }; const closeList = () => { @@ -288,7 +289,7 @@ on:click={toggleList} > - +