jpuri / react-draft-wysiwyg

A Wysiwyg editor build on top of ReactJS and DraftJS. https://jpuri.github.io/react-draft-wysiwyg
MIT License
6.41k stars 1.16k forks source link

Error in IE11 .startsWith #217

Open idrumgood opened 7 years ago

idrumgood commented 7 years ago

The bug is coming from Draft.js, however I only encounter this when using react-draft-wysiwyg. I experience it both on your demo page, and when building the project locally and viewing that demo page in IE11.

if (!query.startsWith(name)) { line 1118 of Draft.js

idrumgood commented 7 years ago

It appears this is a known example and they encourage you to use polyfills. https://github.com/facebook/draft-js/blob/69890ed57b5f4256cc93ae8e9ea178296851a23e/docs/Advanced-Topics-Issues-and-Pitfalls.md

jpuri commented 7 years ago

Thanks for bringing this up @idrumgood 👍

cveilleux commented 7 years ago

+1, it makes no sense for every libraries in the world to bundle their own polyfills.

your end project should bundle a string.startswith polyfill once.

At best, some projects have started indicating the need to polyfill IE in their README.