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

Fix OrbitControls in firefox #7310

Closed
wants to merge 2 commits into from
Closed

Fix OrbitControls in firefox #7310

wants to merge 2 commits into from

Conversation

fkammer
Copy link
Contributor

@fkammer fkammer commented Oct 8, 2015

Zooming in & out of objects in firefox does also scroll the hole page. There are multiple StackOverflow discussions about this issue. See here and here.

The answer in the first linked question also provides a link where you can experience the bug: http://www.matheretter.de/formeln/geometrie/zylinder/

I fixed that behavior by changing the event listener from DOMMouseScroll to MozMousePixelScroll.

Used Firefox Version: 41.0.1 on OS X El Capitan (10.11)

@mrdoob
Copy link
Owner

mrdoob commented Oct 8, 2015

Sounds good. Do you mind doing a new PR targeting the dev branch instead?

@fkammer
Copy link
Contributor Author

fkammer commented Oct 12, 2015

No problem. I rebased it and created a new PR: #7331

@bsergean
Copy link

Hi there, I was looking at this change and it seems that MozMousePixelScroll is only working for firefox: what about other browser like Chrome or IE ?

If they don't support this event, will Zoom be broken on those browsers ?

@bsergean
Copy link

Nevermind it looks like the previous event was already firefox specific; please ignore my comment.

@fkammer
Copy link
Contributor Author

fkammer commented Oct 12, 2015

@bsergean DOMMouseScroll already was a firefox-only eventListener. For other browsers the mousewheel listener should work.

@bsergean
Copy link

Got it @fkammer / I figured this out while looking more in depth at your fix. Thanks for the fix btw, this was quite annoying.

@fkammer
Copy link
Contributor Author

fkammer commented Oct 12, 2015

It really is! :D It surprises me that nobody fixed it before

@threejsworker
Copy link

The examples of this pullrequest are now built and visible in threejsworker. To view them, go to the following link:

http://threejsworker.com/viewpullrequest.html#7310

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

Successfully merging this pull request may close these issues.

None yet

4 participants