react-map-gl-geocoder icon indicating copy to clipboard operation
react-map-gl-geocoder copied to clipboard

Wrong item selected in autocomplete on chrome android

Open humbkr opened this issue 5 years ago • 2 comments

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

humbkr avatar May 01 '20 09:05 humbkr

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?

humbkr avatar May 01 '20 12:05 humbkr

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 😀.

SamSamskies avatar May 01 '20 16:05 SamSamskies