Skip to content

Commit

Permalink
add comment to clearify onTouchEnd workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
karussell committed Dec 6, 2024
1 parent 0bf8a9f commit 5191c54
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/sidebar/search/AddressInputAutocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ function AutocompleteEntry({
}}
// using click events for mouse interaction and touch end to select an entry.
onClick={() => onSelect()}
// TODO NOW is this onTouchEnd workaround still required?
// onTouchEnd={e => {
// e.preventDefault() // do not forward click to underlying component
// onSelect()
// }}
// minor workaround to improve success rate for click even if start and end location on screen are slightly different
onTouchEnd={e => {
e.preventDefault() // do not forward click to underlying component
onSelect()
}}
>
{children}
</button>
Expand Down

0 comments on commit 5191c54

Please sign in to comment.