mapbox / mapbox/mapbox-gl-js

Click event some time does not work

Open
#13,144 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged needs information :pray:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-js version**: 3.3.0

**browser**: CHROME

### Steps to Trigger Behavior

1. add
```
this.map.on('click', 'zipcodes', (e) => {
alert(`A click event has occurred on a visible portion of the poi-label layer at ${e.lngLat}`);
});
```

3. click randomly the layer
4.

### Link to Demonstration

https://jsbin.com/

### Expected Behavior

### Actual Behavior

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 with the map.on('click', 'zipcodes', ...) listener shown in the issue and try to reproduce the intermittent behavior in Chrome using the provided jsbin link. Record the expected and actual behavior, which are currently missing, and verify that clicks on the visible layer consistently produce the intended event.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.