Skip to content

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

@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