Open cimak opened 5 years ago
the library relies completely on the current available document/window... Semantic UI React Modal deals with it with a "mountNode" prop, so you can pass in another DOM ref or another window/document.
@cimak the ownerDocument was the way to go and I fixed this in my fork (if that's of your liking)
Pane resizing doesn't work when the component is mounted in external window (
ReactDOM.createPortal()
+window.open()
). That's because SplitPane is listening formouseup
/mousemove
/touchmove
on the wrongdocument
:So although SplitPane is rendered/mounted in the external window, it is listening for events on the
document
of the main window.I think something like this should do the trick: https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument