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

Navigation_control.js has copyMouseEvent function which ignores buttons #5148

Closed
JelmerBaas opened this issue Aug 15, 2017 · 1 comment
Closed

Comments

@JelmerBaas
Copy link

Navigation_control.js has copyMouseEvent function which ignores buttons and forces right mouse button. This event propagates to the map and fires our right mouse up handler.

mapbox-gl-js version: 0.39.1

Steps to Trigger Behavior

  1. Create map with compass
  2. Left click compass
  3. originalEvent.button is always 2

Expected Behavior

copyMouseEvent copies original button

Actual Behavior

copyMouseEvent has hard-coded buttons: 2

See: https://jsfiddle.net/oqnta3ek/

jfirebaugh added a commit that referenced this issue Aug 17, 2017
Reuse the existing code directly, rather than synthesizing mouse events, which doesn't work on IE (#4784) and triggers mouse event listeners unexpectedly (#5148).
jfirebaugh added a commit that referenced this issue Aug 17, 2017
Reuse the existing code directly, rather than synthesizing mouse events, which doesn't work on IE (#4784) and triggers mouse event listeners unexpectedly (#5148).
jfirebaugh added a commit that referenced this issue Aug 22, 2017
Reuse the existing code directly, rather than synthesizing mouse events, which doesn't work on IE (#4784) and triggers mouse event listeners unexpectedly (#5148).
jfirebaugh added a commit that referenced this issue Aug 22, 2017
Reuse the existing code directly, rather than synthesizing mouse events, which doesn't work on IE (#4784) and triggers mouse event listeners unexpectedly (#5148).
@jfirebaugh
Copy link
Contributor

Fixed in #5157.

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

No branches or pull requests

2 participants