Skip to content

Commit 7a43778

Browse files
committed
comment
1 parent 7f7844a commit 7a43778

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sidebar/search/AddressInput.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export default function AddressInput(props: AddressInputProps) {
226226
style={text.length == 0 ? { display: 'none' } : {}}
227227
className={styles.btnInputClear}
228228
onMouseDown={(e) =>
229-
e.preventDefault() // prevents that input->onBlur is called when clicking the button
229+
e.preventDefault() // prevents that input->onBlur is called when clicking the button
230230
}
231231
onClick={(e) => {
232232
setText('')
@@ -240,11 +240,11 @@ export default function AddressInput(props: AddressInputProps) {
240240
style={text.length == 0 && hasFocus ? {} : { display: 'none' }}
241241
className={styles.btnCurrentLocation}
242242
onMouseDown={(e) =>
243-
e.preventDefault() // prevents that input->onBlur is called when clicking the button
243+
e.preventDefault() // prevents that input->onBlur is called when clicking the button (loosing focus would hide this button)
244244
}
245245
onClick={() => {
246246
onCurrentLocationSelected(props.onAddressSelected)
247-
// but when clicked => close mobile-input view
247+
// but when clicked => we want to loose the focuse e.g. to close mobile-input view
248248
searchInput.current!.blur()
249249
}}
250250
>

0 commit comments

Comments
 (0)