-
-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Mosaic windows are not resizable in a popup window. #91
Comments
It looks like this is your issue facebook/react#12355 unless other React Components are working in that window. Let me know if this is not the case and I can reopen! |
Other react components are working fine. So I still think this is a bug. Spent a little time digging into it. When you render something in a new window the JS is running in the original window, this means that any references to window and document are to the orginal window and not the popup. I think this means there is two issues:
|
I have managed to produce an example of react-dnd working across windows, can be found here. In WindowPortal I register the required react-dnd event listeners on to the newly opened window using the react-dnd manager. In the above example it is also possible to drag and drop the chess piece from one window to the other. I have also managed to get drag and drop as well as window resizing working within react-mosaic (although its rather messy atm). The code can be found in this repo I guess the next step is deciding which of the below to support:
|
When you use the component in a new browser window (using a react portal), you can not resize or move the react-mosaic windows.
Bug report
Steps to reproduce
An example - codesandbox github repo
You will need to enable popups and refresh the sandbox.
I noticed that if you then move the cursor into the original document the movements will then affect the popup. Could this be that there is a listener bound on the document, that isn't being added in the popup window?
Actual behavior
Windows are not being resized / moved.
Expected behavior
Windows should be resized / moved
The text was updated successfully, but these errors were encountered: