Prevent draggable marker touch event propagation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**: v1.9.0
### Question
I'm using Mapbox in a Facebook Messenger chatbot which renders the map inside an HTML webview. When dragging a draggable marker, the `touchmove` event also gets propagated to the parent webview. This then moves it up and down. I can't immediately see a way to get the event in the drag handlers so that I could call `event. stopPropagation()`.
Here's an example of the issue:

Is there an accepted method to achieve this?
Can I get access to the events in the drag handlers or is there a better way to do this?
Thanks!
### Links to related documentation
https://docs.mapbox.com/mapbox-gl-js/api/markers/#marker-events
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 Marker events documentation linked in the issue and trace the draggable marker touch and drag handlers. Reproduce the touchmove propagation in the Messenger webview, then verify that dragging a marker no longer moves the parent webview without breaking marker dragging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100