Skip to content

Scoped Document (handle pop out window with ReactDOM.createPortal) #592

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
llamamoray opened this issue Sep 17, 2019 · 1 comment
Open

Comments

@llamamoray
Copy link

llamamoray commented Sep 17, 2019

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?

@enzoferey
Copy link

enzoferey commented Nov 11, 2024

I know this is 5 years old, but still the only issue I found related to this topic.

See #920 (comment).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants