casesandberg / casesandberg/react-color

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

Open
#815 1 comment 4 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

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

because
![image (17)](https://user-images.githubusercontent.com/1305378/114675334-66819680-9d08-11eb-8f9c-f756abd262c1.png)

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

Contributor guide

Open the contributing guide

Research direction

Start at src/components/common/Saturation.js line 23, where the issue reports the IE11 failure, and compare the containment behavior with the linked document.contains implementation. Decide whether the project should warn about IE11 or address the compatibility issue. Done means the chosen behavior no longer produces the reported IE11 error, with compatibility checked against the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.