Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marker with img tag looses its focus when it starts dragging. #7795

Closed
cs09g opened this issue Jan 22, 2019 · 2 comments
Closed

Marker with img tag looses its focus when it starts dragging. #7795

cs09g opened this issue Jan 22, 2019 · 2 comments

Comments

@cs09g
Copy link
Contributor

cs09g commented Jan 22, 2019

mapbox-gl-js version:
v0.52.0

browser:
Firefox 64.0.2
IE 11

Steps to Trigger Behavior

  1. create marker with img element
  2. set draggable true and add to map
  3. start dragging

Link to Demonstration

https://jsfiddle.net/9ru0z3dw/

Expected Behavior

marker should be dragging as expected.

Actual Behavior

marker shows its ghost icon and cursor turns to not-allowed.

Workaround

Setting following code on marker element, it works as expected but, I think this should be a part of library.
element.ondragstart = () => { return false; }

@cs09g
Copy link
Contributor Author

cs09g commented Jan 23, 2019

@mourner May I add that workaround code in marker.js with PR? It'll be placed https://github.com/mapbox/mapbox-gl-js/blob/master/src/ui/marker.js#L184

@ryanhamley
Copy link
Contributor

@cs09g We always welcome PRs! You're right that it would be added in the constructor.

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

No branches or pull requests

3 participants