React-fiber (drei) ScrollControls prevent<Html> from scrolling

1.7k Views Asked by At

I've noticed in V9 of drei there is a bug when combing the <Html> elment with <ScrollControls>.

I just want bind text to a 3D element but the ScrollControll makes the text scroll out of the view: CodeSandBox Example

It works fine in v8: CodeSandBox Example

1

There are 1 best solutions below

0
Tomas Gonzalez On

I fixed this in this PR https://github.com/pmndrs/drei/pull/1126 we just have to wait until they approve it. But you can just patch the library yourself using https://www.npmjs.com/package/patch-package, it should be easy as it is just one line change.

Edit: Now that I think about it, you could probably fix it also by sending gl.domElement.parentNode as the portal prop.