casesandberg/react-color

`getContainerRenderWindow` in Saturation component inside iframe is causing a crash

yarindeohcld opened this issue · 7 comments

I'm rendering a custom picker inside an iframe that is using Saturation common component.
I'm receiving a CORS origin error that caused by the following code:

image

getContainerRenderWindow

      var container = this.container;

      var renderWindow = window;
      while (!renderWindow.document.contains(container) && renderWindow.parent !== renderWindow) {
        renderWindow = renderWindow.parent;
      }
      return renderWindow;
    }

after evaluating renderWindow = renderWindow.parent, there's no document to access and it caused the failures. What is the propose behind that ?

a local fix was to override this method and return always window.

any insights ? it need to be used in prod

same problem, still finding solution

Request to revert this PR #690

image
There is no document here!

still 2.19.3

Having this issue too and my panel is not even display the Saturation option!

Execute: yarn add react-color@2.18.1 to install a specific version, without upgrading to 2.19.x."