pmndrs / react-three-fiber

🇨🇭 A React renderer for Three.js
https://docs.pmnd.rs/react-three-fiber
MIT License
27.18k stars 1.55k forks source link

Cancelling Event propagation on instances is broken #3084

Open ricardomatias opened 10 months ago

ricardomatias commented 10 months ago

Stopping the propagation of a click event on a instanced mesh, results in the parent node still having that same event triggered.

Example here

ashleymvanduzer commented 10 months ago

I might be very wrong but I think it has to do with this line, seems like the canvas is exempt from the propagation rule, I guess out of necessity: https://github.com/pmndrs/react-three-fiber/blob/2ad846f29b7172ab284561ad3afdd2bb739ef46d/packages/fiber/src/web/Canvas.tsx#L103C1-L105C12

Try wrapping the instances in a group and adding an event listener to the group and logging something, you'll see nothing from the group driven event print to the console