react-rnd icon indicating copy to clipboard operation
react-rnd copied to clipboard

Bounds="parent" is not working when screen is resized

Open h0jeZvgoxFepBQ2C opened this issue 5 years ago • 4 comments

Overview of the problem

Setting bounds="parent" I'm using react-rnd version 10.1.10

My browser is: Chrome

I am sure this issue is not a duplicate? Yes

Description

I set bounds to "parent" - works without problems. But when I resize my browser screen, the element is outside of the parents scope.

Steps to Reproduce

  1. Set bounds to "parent"
  2. Resize window

Expected behavior

Container should stay inside.

Actual behavior

screencast 2020-07-20 11-39-452

h0jeZvgoxFepBQ2C avatar Jul 20 '20 09:07 h0jeZvgoxFepBQ2C

Actually this is a react-draggable issue: https://github.com/STRML/react-draggable/issues/363

h0jeZvgoxFepBQ2C avatar Jul 20 '20 10:07 h0jeZvgoxFepBQ2C

I'm hitting this when rendering into a react portal that goes into an iframe and not sure if this is related.

burtonator avatar Aug 23 '20 17:08 burtonator

Does anyone know how to fix it? Thanks.

shenenya avatar Feb 03 '21 03:02 shenenya

I'm facing same issue and the solution from link seems not to be working with Rnd.

Paolo-Sotorro avatar Apr 03 '22 11:04 Paolo-Sotorro