In here you're accessing the attribute contentEditable directly via the element.
https://github.com/deshiknaves/caret-pos/blob/94657c8aac4b8c40002029c4c5b31584e46e8849/src/utils.js#L8-L11
This is allowed in browsers like Chrome or FireFox, however - in other DOM environments like IE or JSDOM (the popular library used in jest testing), the only way to access this attribute is via element.getAttribute("contenteditable"). This is also supported by any other browsers and DOM environments, and should be changed to support more projects :smile:
I've opened a PR that fixes it.
In here you're accessing the attribute
contentEditable
directly via the element. https://github.com/deshiknaves/caret-pos/blob/94657c8aac4b8c40002029c4c5b31584e46e8849/src/utils.js#L8-L11 This is allowed in browsers like Chrome or FireFox, however - in other DOM environments like IE or JSDOM (the popular library used injest
testing), the only way to access this attribute is viaelement.getAttribute("contenteditable")
. This is also supported by any other browsers and DOM environments, and should be changed to support more projects :smile: I've opened a PR that fixes it.10