Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
karussell committed Dec 6, 2024
1 parent 7f7844a commit 7a43778
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sidebar/search/AddressInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export default function AddressInput(props: AddressInputProps) {
style={text.length == 0 ? { display: 'none' } : {}}
className={styles.btnInputClear}
onMouseDown={(e) =>
e.preventDefault() // prevents that input->onBlur is called when clicking the button
e.preventDefault() // prevents that input->onBlur is called when clicking the button
}
onClick={(e) => {
setText('')
Expand All @@ -240,11 +240,11 @@ export default function AddressInput(props: AddressInputProps) {
style={text.length == 0 && hasFocus ? {} : { display: 'none' }}
className={styles.btnCurrentLocation}
onMouseDown={(e) =>
e.preventDefault() // prevents that input->onBlur is called when clicking the button
e.preventDefault() // prevents that input->onBlur is called when clicking the button (loosing focus would hide this button)
}
onClick={() => {
onCurrentLocationSelected(props.onAddressSelected)
// but when clicked => close mobile-input view
// but when clicked => we want to loose the focuse e.g. to close mobile-input view
searchInput.current!.blur()
}}
>
Expand Down

0 comments on commit 7a43778

Please sign in to comment.