Skip to content

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

Description

@llamamoray

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?

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions