Skip to content

Commit

Permalink
try again fix of #398
Browse files Browse the repository at this point in the history
  • Loading branch information
karussell committed Jul 23, 2024
1 parent 2698ba9 commit a5382eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sidebar/search/AddressInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 3 additions & 0 deletions src/sidebar/search/AddressInputAutocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
</button>
Expand Down

0 comments on commit a5382eb

Please sign in to comment.