Skip to content

Commit 5191c54

Browse files
committed
add comment to clearify onTouchEnd workaround
1 parent 0bf8a9f commit 5191c54

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/sidebar/search/AddressInputAutocomplete.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ function AutocompleteEntry({
113113
}}
114114
// using click events for mouse interaction and touch end to select an entry.
115115
onClick={() => onSelect()}
116-
// TODO NOW is this onTouchEnd workaround still required?
117-
// onTouchEnd={e => {
118-
// e.preventDefault() // do not forward click to underlying component
119-
// onSelect()
120-
// }}
116+
// minor workaround to improve success rate for click even if start and end location on screen are slightly different
117+
onTouchEnd={e => {
118+
e.preventDefault() // do not forward click to underlying component
119+
onSelect()
120+
}}
121121
>
122122
{children}
123123
</button>

0 commit comments

Comments
 (0)