Feature
Overview of the problem
I'm using react-rnd 10.0.0
My browser is: Chrome
I am sure this issue is not a duplicate? Yes
Reproduced project
https://codesandbox.io/embed/nostalgic-chaum-se04o
Description
This is a bit of an edge case, but I'm using react-rnd inside a react portal which has been opened in a new window.
The issue I have is that react-rnd uses boundary = document.querySelector(this.props.bounds); which hsa the scope of the original window.
|
boundary = document.querySelector(this.props.bounds); |
This means that it can not find the selector or window for resizing or moving of the Rnd.
I'd like to propose a change to include a prop scopedDocument where you could pass in the document you wish the library to use.
Is this something you'd be interested in merging in if I created a PR?
Feature
Overview of the problem
I'm using react-rnd 10.0.0
My browser is: Chrome
I am sure this issue is not a duplicate? Yes
Reproduced project
https://codesandbox.io/embed/nostalgic-chaum-se04o
Description
This is a bit of an edge case, but I'm using react-rnd inside a react portal which has been opened in a new window.
The issue I have is that react-rnd uses
boundary = document.querySelector(this.props.bounds);which hsa the scope of the original window.react-rnd/src/index.tsx
Line 379 in eb3313e
This means that it can not find the selector or window for resizing or moving of the Rnd.
I'd like to propose a change to include a prop
scopedDocumentwhere you could pass in the document you wish the library to use.Is this something you'd be interested in merging in if I created a PR?