mirror of
https://github.com/responsively-org/responsively-app
synced 2024-09-20 14:21:54 +00:00
adding the url-select on click
This commit is contained in:
parent
1d0b0313ea
commit
1a71490c9b
1 changed files with 8 additions and 0 deletions
|
@ -40,6 +40,7 @@ const AddressBar = () => {
|
|||
const [homepage, setHomepage] = useState<string>(
|
||||
window.electron.store.get('homepage')
|
||||
);
|
||||
const [isFocused, setIsFocused] = useState(false);
|
||||
const [deleteStorageLoading, setDeleteStorageLoading] =
|
||||
useState<boolean>(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);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<div
|
||||
className={`${
|
||||
|
|
Loading…
Reference in a new issue