react-clamp-lines
react-clamp-lines copied to clipboard
Clamping doesn't work if the ClampLines element is inside a RelativePortal
https://codesandbox.io/embed/clamplines-weirdness-relativeportal-yo87m
Basically, the react-relative-portal
package creates a new element at the exact position it would be at normally but the element is moved straight to the body
. This causes issues with ClampLines - The lines are shown, but not clamped.
I've added another example to the codesandbox with a ClampLines
element in the root div. It's working perfectly fine in the root div, but doesn't clamp anything in the Portal
.