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

WheelEvent turns into MouseEvent in Chrome #73

Closed
ghost opened this issue Oct 28, 2014 · 1 comment
Closed

WheelEvent turns into MouseEvent in Chrome #73

ghost opened this issue Oct 28, 2014 · 1 comment
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Oct 28, 2014

Usually when using an eventhandler for "mousewheel" the event is of type WheelEvent. However xml3d generates a MouseEvent which is missing information about the wheel delta. As far as I know this only applies to Chrome. Firefox uses a DOMMouseScroll Event instead.

var xml3dElem = document.querySelector('xml3d');
xml3dElem.addEventListener('mousewheel', wheelEventHandler);

function wheelEventHandler(event) {
    console.log(event);     // will output event of type MouseEvent, not WheelEvent as expected
}
@ksons ksons self-assigned this Feb 3, 2015
@ksons ksons modified the milestones: Release 5.0, Release 4.9 Feb 3, 2015
@csvurt csvurt assigned csvurt and unassigned ksons Mar 9, 2015
@csvurt
Copy link
Contributor

csvurt commented Mar 9, 2015

This has been fixed in 4ea9ac7 which will be part of the 4.9 release.

XML3D now supports the "wheel" event type which will return a WheelEvent object (with the delta fields) instead of a MouseEvent.

DOMMouseScroll is not a standard event and remains unsupported, but modern Firefox supports the "wheel" events anyway.

@csvurt csvurt closed this as completed Mar 31, 2015
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