mapbox / mapbox/mapbox-gl-draw
Popup cannot open at draw.create
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 612
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 5
Description
**mapbox-gl-js version**: 0.45.0
**mapbox-gl-draw version**: 1.0.9
### Steps to Trigger Behavior
1. Listen for `draw.create`
2. Create a popup inside it
### Expected Behavior
Popup should open
### Actual Behavior
Popup does not open.
**Example**
Click somewhere on the map, try with setTimeout uncommented.
https://codesandbox.io/s/6y4x0oxw9k
Is is possible that this is a duplicate of an issue from 2016? https://github.com/mapbox/mapbox-gl-draw/issues/495
What is the right solution here? Using `setTimeout` is such a hack and I cannot be sure that it'll work for everyone. Still, with setTimeout it can be made to work.
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 with the CodeSandbox reproduction and compare behavior between mapbox-gl-js 0.45.0 and mapbox-gl-draw 1.0.9 when a popup is created inside the draw.create listener. Read the related 2016 issue (#495) and verify whether the event timing explains why setTimeout works; done means a popup opens reliably without that workaround.
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
- 35/100