casesandberg / react-color

:art: Color Pickers from Sketch, Photoshop, Chrome, Github, Twitter & more
http://casesandberg.github.io/react-color/
MIT License
12.05k stars 922 forks source link

Object doesn't support property or method 'contains' in ie11 #815

Open capaj opened 3 years ago

capaj commented 3 years ago

this line breaks in IE11: https://github.com/casesandberg/react-color/blob/bc9a0e1dc5d11b06c511a8e02a95bd85c7129f4b/src/components/common/Saturation.js#L23

because image (17)

so it would be nice to do one of the following:

  1. warn users that this lib is not compatible with ie 11
  2. either include a polyfill or change the method used to check for containment to something like this https://github.com/ljharb/document.contains/blob/main/implementation.js
brendanwheble commented 3 years ago

Experiencing the same issue in IE11