Skip to content

Commit 9f16994

Browse files
committed
minor comment
1 parent d52ef4b commit 9f16994

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sidebar/search/AddressInputAutocomplete.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ function AutocompleteEntry({
116116
onSelect()
117117
}}
118118
onMouseDown={e => {
119-
e.preventDefault() // Prevent blur event for our input, see #398.
119+
// prevents that input->onBlur is called when clicking the autocomplete item (focus would be lost and autocomplete items would disappear before they can be clicked)
120120
// See also the onMouseDown calls in the buttons in AddressInput.tsx created for the same reason.
121+
e.preventDefault()
121122
}}
122123
>
123124
{children}

0 commit comments

Comments
 (0)