Skip to content

Allow draggable markers to be dragged outside of the canvas and still receive mouseup events#13668

Open
ntzm wants to merge 1 commit into
mapbox:mainfrom
ntzm:fix-marker-drag-outside-canvas
Open

Allow draggable markers to be dragged outside of the canvas and still receive mouseup events#13668
ntzm wants to merge 1 commit into
mapbox:mainfrom
ntzm:fix-marker-drag-outside-canvas

Conversation

@ntzm
Copy link
Copy Markdown

@ntzm ntzm commented May 12, 2026

When dragging a draggable marker outside the map canvas, and then releasing the mouse, the marker does not know that the mouse has been released. This change adds listeners to window mouse events for draggable markers so that this is no longer the case.

Launch Checklist

  • Make sure the PR title is descriptive and preferably reflects the change from the user's perspective.
  • Add additional detail and context in the PR description (with screenshots/videos if there are visual changes).
  • Manually test the debug page.
  • Write tests for all new functionality and make sure the CI checks pass.
  • Document any changes to public APIs.
  • Post benchmark scores if the change could affect performance.
  • Tag @mapbox/map-design-team @mapbox/static-apis if this PR includes style spec API or visual changes.
  • Tag @mapbox/gl-native if this PR includes shader changes or needs a native port.
  • Tag @mapbox/gl-native if this PR disables any test because it also needs to be disabled on their side.
  • Create a ticket for gl-native to groom in the MAPSNAT JIRA queue if this PR includes shader changes or features not present in the native side or if it disables a test that's not disabled there.

@ntzm ntzm requested a review from a team as a code owner May 12, 2026 14:47
@ntzm ntzm requested review from dcoj and removed request for a team May 12, 2026 14:47
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 12, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Copy Markdown

Hey, @ntzm 👋 Thanks for your contribution to Mapbox GL JS!

Important: This repository does not accept direct merges. All changes go through our internal review process.

What happens next:

  1. A team member will review your PR here first
  2. If it looks good, they will import it to our internal repository for further review
  3. If approved, changes will be synced back here via our release process

Please respond to any review comments on this PR. For more details, see CONTRIBUTING.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants