diff --git a/desktop-app/src/renderer/components/ToolBar/AddressBar/index.tsx b/desktop-app/src/renderer/components/ToolBar/AddressBar/index.tsx index b592c788..8ac80114 100644 --- a/desktop-app/src/renderer/components/ToolBar/AddressBar/index.tsx +++ b/desktop-app/src/renderer/components/ToolBar/AddressBar/index.tsx @@ -40,6 +40,7 @@ const AddressBar = () => { const [homepage, setHomepage] = useState( window.electron.store.get('homepage') ); + const [isFocused, setIsFocused] = useState(false); const [deleteStorageLoading, setDeleteStorageLoading] = useState(false); const [deleteCookiesLoading, setDeleteCookiesLoading] = @@ -262,10 +263,17 @@ const AddressBar = () => { onChange={(e) => setTypedAddress(e.target.value)} onKeyDown={handleKeyDown} onBlur={() => { + setIsFocused(false); setTimeout(() => { setIsSuggesting(false); }, 100); }} + onSelect={(e) => { + if (e.target === inputRef.current && !isFocused) { + inputRef.current?.select(); + setIsFocused(true); + } + }} />