diff --git a/src/sidebar/search/AddressInput.tsx b/src/sidebar/search/AddressInput.tsx index 315e45eb..a05a8802 100644 --- a/src/sidebar/search/AddressInput.tsx +++ b/src/sidebar/search/AddressInput.tsx @@ -209,7 +209,9 @@ export default function AddressInput(props: AddressInputProps) { setHasFocus(true) props.clearDragDrop() }} - onBlur={() => {}} + onBlur={() => { + if (!isSmallScreen) hideSuggestions() // see #398 + }} value={text} placeholder={tr( type == QueryPointType.From ? 'from_hint' : type == QueryPointType.To ? 'to_hint' : 'via_hint' diff --git a/src/sidebar/search/AddressInputAutocomplete.tsx b/src/sidebar/search/AddressInputAutocomplete.tsx index c850bc46..fcc0131e 100644 --- a/src/sidebar/search/AddressInputAutocomplete.tsx +++ b/src/sidebar/search/AddressInputAutocomplete.tsx @@ -111,6 +111,9 @@ function AutocompleteEntry({ e.preventDefault() // do not forward click to underlying component onSelect() }} + onMouseDown={e => { + e.preventDefault() // prevent blur event for our input, see #398 + }} > {children}