react-map-gl-geocoder
react-map-gl-geocoder copied to clipboard
Wrong item selected in autocomplete on chrome android
Hello,
I encountered a weird bug on Android on the autocomplete: when you scroll in your page then click on an item, the selected item that is put in the field is not the one you pressed on, but the one that was originally at this position before scrolling.
Sandbox to reproduce the bug: https://codesandbox.io/s/react-map-gl-geocoder-v2-example-1yhuc
Exact steps:
- start typing in the field
- the autocomplete displays the suggestions
- keep in mind the position of the first result on your screen then scroll a bit to position another result in the same location
- press on the other result
- the first result is selected, not the one you pressed
Update: this is an issue with the mapbox-gl-geocoder library, I opened an issue on their side: https://github.com/mapbox/mapbox-gl-geocoder/issues/357
On a side note, the mapbox-gl-geocoder dependency is several versions behind, and I have other bugs that may have been fixed on later versions, @SamSamskies do you plan to upgrade anytime soon?
Hi @humbkr, thanks for reporting the issue. Unfortunately, I'm not sure when I'll get around to upgrading. I'll gladly accept PRs though 😀.