mapbox / mapbox/mapbox-gl-geocoder
Suggestion list doesn't close when clicking on a marker
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 388
- Forks
- 181
- PR merge metrics
- No merged PRs in 30d
Description
The suggestion list closes when clicking somewhere on the map, but not when clicking on a marker.
Steps to reproduce:
- go to https://docs.mapbox.com/mapbox-gl-js/example/point-from-geocoder-result/
- search for a place and pick one in the suggestion list so an orange marker gets display on the map
- click the search bar to make the suggestion list appear again, then click the orange marker: suggestion list won't close
- click somewhere else in the map: suggestion list closes

It's kind of annoying because in my case I reduce the geocoder on blur:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue at the linked point-from-geocoder-result example: reopen the suggestion list, then click the orange marker and compare that behavior with clicking elsewhere on the map. Trace the marker click handling and identify the existing close behavior; done means clicking a marker closes the suggestion list consistently with other map clicks, with a regression check if the repository provides one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100