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

[examples/index.html]: remove onmousewheel #21647

Merged
merged 2 commits into from
Apr 14, 2021
Merged

[examples/index.html]: remove onmousewheel #21647

merged 2 commits into from
Apr 14, 2021

Conversation

puxiao
Copy link
Contributor

@puxiao puxiao commented Apr 14, 2021

The first reason

mousewheel

https://developer.mozilla.org/en-US/docs/Web/API/Element/mousewheel_event

This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards ...

Important: Instead of this obsolete event, use the standard wheel event.


Second reason

oh...

onmousewheel


So

-	<iframe id="viewer" name="viewer" allowfullscreen allowvr onmousewheel=""></iframe>
+	<iframe id="viewer" name="viewer" allowfullscreen allowvr></iframe>

...

// Events

+	viewer.addEventListener( 'wheel', function ( event ) {
+
+		event.preventDefault();
+
+	}, { passive: false } );

This contribution is funded by Example: https://raw.githack.com/puxiao/three.js/dev/examples/index.html

examples/index.html Outdated Show resolved Hide resolved
@puxiao puxiao changed the title [examples/index.html]: Change the onmousewheel of the viewer [examples/index.html]: remove onmousewheel Apr 14, 2021
@mrdoob mrdoob added this to the r128 milestone Apr 14, 2021
@mrdoob mrdoob merged commit 5f61a1f into mrdoob:dev Apr 14, 2021
@mrdoob
Copy link
Owner

mrdoob commented Apr 14, 2021

Thanks!

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.

3 participants