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

short drag with zoom tool does not fire plotly_click #2598

Closed
arlowhite opened this issue May 2, 2018 · 3 comments
Closed

short drag with zoom tool does not fire plotly_click #2598

arlowhite opened this issue May 2, 2018 · 3 comments
Labels
bug something broken

Comments

@arlowhite
Copy link

arlowhite commented May 2, 2018

Sometimes, a user moves the mouse slightly during a click.
When the zoom tool is active, a short drag does not fire plotly_click, nor does zoom happen due to some minimum drag length for zoom. I've seen users frustrated by this behavior.
I think plotly_click should fire when there's a short drag under the min drag length.
The Pan tool seems to fire plotly_click for short drags.

This can be reproduced with the official demo: https://plot.ly/javascript/click-events/

@alexcjohnson
Copy link
Collaborator

In what contexts are you seeing this? We're probably not consistent about this, but at least the callers that go through dragElement get a minDrag that's usually set to 8px and should still emit a plotly_click below that threshold.

@arlowhite
Copy link
Author

@alexcjohnson it's when the zoom tool is active
Try the official demo: https://plot.ly/javascript/click-events/
Drag a few pixels and nothing happens (except for gray background appearing during drag).
Switch to Pan tool, and small drag fires plotly_click

@arlowhite arlowhite changed the title sloppy plotly_click (slight cursor move during click) short drag with zoom tool does not fire plotly_click May 2, 2018
@alexcjohnson
Copy link
Collaborator

You're right, that should register a click. Thanks for clarifying!
We should probably make variants of all tests for all of our click events, where between mousedown and mouseup we add a small mousemove.

@alexcjohnson alexcjohnson added the bug something broken label May 2, 2018
alexcjohnson added a commit that referenced this issue May 22, 2018
fix #2598 - sloppy click on cartesian zoom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

2 participants