mapbox / mapbox/mapbox-gl-geocoder

Suggestion list doesn't close when clicking on a marker

Open
#439 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug
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

![MapboxGeocoder](https://user-images.githubusercontent.com/10246002/139069183-1ad3abc0-e395-4678-a010-6b1790231bf4.gif)

It's kind of annoying because in my case I reduce the geocoder on blur:
![image](https://user-images.githubusercontent.com/10246002/139070448-251bcd0f-21ef-4b55-93cd-8f310c892158.png)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.