Skip to content

Commit a5382eb

Browse files
committed
try again fix of #398
1 parent 2698ba9 commit a5382eb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/sidebar/search/AddressInput.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ export default function AddressInput(props: AddressInputProps) {
209209
setHasFocus(true)
210210
props.clearDragDrop()
211211
}}
212-
onBlur={() => {}}
212+
onBlur={() => {
213+
if (!isSmallScreen) hideSuggestions() // see #398
214+
}}
213215
value={text}
214216
placeholder={tr(
215217
type == QueryPointType.From ? 'from_hint' : type == QueryPointType.To ? 'to_hint' : 'via_hint'

src/sidebar/search/AddressInputAutocomplete.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ function AutocompleteEntry({
111111
e.preventDefault() // do not forward click to underlying component
112112
onSelect()
113113
}}
114+
onMouseDown={e => {
115+
e.preventDefault() // prevent blur event for our input, see #398
116+
}}
114117
>
115118
{children}
116119
</button>

0 commit comments

Comments
 (0)