sghall / react-compound-slider

:black_medium_small_square: React Compound Slider | A small React slider with no opinion on markup or styles
https://react-compound-slider.netlify.com
MIT License
626 stars 80 forks source link

Allow slider to work in popup window by registering event listener with Slider's ownerDocument #137

Open bsteinbk opened 3 years ago

bsteinbk commented 3 years ago

Problem or feature description: Mouse events are processed in parent window and not in popup window opened via window.open() this results in the slider not working properly.

Steps to reproduce (for problems):

    const childWindow = window.open(url, "", `width=800,height=600,menubar=no,resizable=yes,scrollbars=no,status=no,location=no`);
    const reactConnectionDiv = childWindow.document.getElementById("root");
    ReactDOM.render( <>*** component that contains Slider ***</>, reactConnectionDiv);

Versions (for problems): All.

React-Compound-Slider: 3.3.1

React:^16.8.0

Browser: Chrome Version 90.0.4430.212 (Official Build) (64-bit)

Operating System: Windows 10