-
Notifications
You must be signed in to change notification settings - Fork 12
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
Update event spec #78
Conversation
I should still test the new buttons prop, but I don't have a mouse where I am right now. |
Interesting how the |
LGTM! |
@@ -254,6 +257,7 @@ export class RemoteFrameBufferView extends DOMWidgetView { | |||
|
|||
// Scrolling. Need a special throttling that accumulates the deltas. | |||
// Also, only consume the wheel event when we have focus. | |||
// On Firefox, e.buttons is always 0 for wheel events, so we use a cached value for the buttons. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read this on MDN under the section Firefox notes:
On Mac OS X 10.5, the buttons attribute always returns 0 because there is no platform API for implementing this feature.
So it seems you happened upon a very specific corner case. Maybe you only want to use the cached value if the buttons attribute equals zero?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that explains it. Though surprising that Firefox does not fake it a way similar to what we do here.
I'd rather just use the cached value always, for consistency/simplicity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm concerned it's going to be inaccurate though. If I hold my mouse buttons, move out of the window, release the buttons, move back into the window and scroll the wheel, will the values be correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that should work correctly because of mouse capturing. Every mouse down should be followed by a mouse up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closes #56
buttons
prop to wheel event.time_stamp
to all events.