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
middle click #189
Comments
This is a StackOverflow question not related to the plugin. |
why is not related to the plugin? without the plugin the middle click event has type click, with the plugin has type mousewheel and (apparently) there is not any way to differentiate a middle click from a wheel turn |
Clicking via the wheel should trigger a click event, not a wheel one in the same way as clicking on a regular third button on any other mouse. Do you have a concrete example where that’s not the case? |
I have in my code something like:
clicking in selector with left or right button, ev.type==click, with middle button ev.type==mousewheel I'm seeing that the plugin replace type click with mousewheel, and no track of original type is left. A solution could be to save all the changed elements in an array, naming it "originals", or something similar. This way the code could manage the middle click. |
As you can see, there's no mention of As a general rule, if you think there's a bug please prepare a minimal (!) jsFiddle or JSBin example so that we can quickly run it without needing to set anything up manually. Otherwise it's really hard for us to spend time on the issue, especially that often there's no bug but we can't see that before we see a test case which we would have to take time to create by ourselves. |
no mention of click, but at line 103:
overwrites event.type, whose value is 'click' before that line |
We still don’t have a test case, though. |
If the data you seek exists at all, it will be in |
https://jsfiddle.net/paolobenve/dkwnmc88/19/ you can see all the effects of mouse wheel on the event:
checking deltaX/Y permits to detect a rotation, but not to decide wheter a click or a left/right click has been issued |
@dmethvin, |
If it's not in the event the plugin receives then the plugin cannot provide the information. |
with modern mice middle click is performed through the central wheel.
However, apparently the plugin converts all wheel events to a delta, i.e. a wheel turn.
How do I detect a simple click?
The text was updated successfully, but these errors were encountered: