-
Notifications
You must be signed in to change notification settings - Fork 27
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
OS/Browser Specific Mouse Wheel Events #11
Comments
Specific instances I've tested personally by modifying glfw/browser.go to print the actual wheel event:
and then running the event listener locally:
|
I realized this can be tested more easily with a bit of javascript. Open up a web console in any browser (tested on chrome + firefox), and enter the following:
Then any scrolling will result in a log message displaying the full event object. Its fields are fully described here: Note that on Firefox, you need to click where it says "wheel" in the log message to view the full object rather than just the few fields it logs. Looking at the actual events gives more info than the previous post since the WheelEvent struct in Go only deals with the deltaX, deltaY, deltaZ, and deltaMode fields of the javascript object. This may or may not be useful. I tested by scrolling up a single step and recording values:
Except for the laptop + chrome results these results match http://stackoverflow.com/a/24595588/3184079 |
@Omustardo, this issue has a lot of information but it's not specific to the problem you reported in #10. You originally said:
That's what I wanted more details about, so that I can figure out what it would take to be able to reproduce it and resolve it. Here's what information I'm looking for:
|
Ideally the browser scroll events would have deltas with absolute value 1 per scroll wheel step.
Deltas of 10.
Windows 10 |
Perfect, that's what I needed. Thanks. I see one inconsistency... You said:
Did you mean 10? |
Yes, correct. Fixed the post. |
I think I found a situation which is not possible to reconcile between the browser and desktop, unless I'm missing an information source. Environment: Steps to reproduce:
That's bad as is - that the browser supplied GLFW values depend on OS settings, and desktop GLFW isn't affected at all. There's no way to tell this grouped event apart from a single event where the OS setting is to scroll This is related to to https://bugs.chromium.org/p/chromium/issues/detail?id=227454#c23 |
I forgot to post an update here earlier. I investigated this issue a little a few days ago.
I came to the same conclusion. I found there was not enough raw information to be able to differentiate all the different situations. Even if I looked at some of the additional/optional/deprecated fields like Unfortunately, I forgot the exact details (I can get it back if I try it again), but that was my conclusion too. I've asked in #10 (comment), but how critical is fixing this bug for you? What timeline are you on? Thanks! |
I'd much prefer to wait and do it right than to get a hack in quickly. I have essentially no time constraints. My only plans for are for a basic game engine (gome), which I've been working on in my spare time. I can just add a simple fix that should work well enough in most cases. |
Add a simple static analysis workflow
In comparison to the high level discussion of handling mouse wheel events in #10 this issue is to look into specific instances of wheel event behavior.
The basic issue is that mouse "wheel" events provide extremely different delta values on different systems. At minimum browser, OS, and hardware are likely to play a role. For example, on Chrome+Win10, each step of a mouse scroll wheel results in a wheel event with delta value 120. On Firefox+Win10 the delta is 3.
The values goxjs/glfw is getting can be found manually for your system in the web console of:
https://dmitri.shuralyov.com/projects/touch/scroll.html
To see the base values that the system is sending to the browser, use
gopherjs serve
and navigate to:http://localhost:8080/github.com/goxjs/glfw/test/events/
A list of some values can be found here:
http://stackoverflow.com/q/5527601/3184079
The text was updated successfully, but these errors were encountered: