Update setDraftEditorSelection.js#1203
Update setDraftEditorSelection.js#12031Jesper1 wants to merge 3 commits intofacebookarchive:masterfrom
Conversation
Prevent getting IndexSizeError in IE11
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions. |
|
To make this work, this line |
Space after if statement for lint
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
Let's follow along on #1190 which is attempting to fix the same bug and is a little closer to a good fix I think. |
|
Hm, maybe this is different because it is IE? Looks similar though. |
|
Can you try out the fix in #1190 and see if it fixes your issue in IE? |
|
#1190 doesn't fix this problem. Please merge this PR.... |
|
We've to fork Draft.js from you just to add this fix. 😞 Please, let me know if you merge this PR in the future. |
|
Folks seeing this bug: can you (a) verify you are on Draft 0.10.2 or newer and (b) post repro steps for producing the problem? This PR is not the correct fix but I’d like to find a proper fix to the problem you’re seeing. |
|
@sophiebits, we were using |
|
Can I close this PR? |
|
As I said earlier, this is not the correct fix – setDraftEditorSelection should only be called in cases where .rangeCount is nonzero so if this makes a difference it means that there is an error somewhere else. Closing this PR, but @musashinm and anyone else, please file an issue describing how to consistently reproduce this error and that will help to get it fixed. |
Prevent getting IndexSizeError in IE11
Before submitting a pull request, please make sure the following is done...
master.npm test)npm run lint) and passes Flow (npm run flow)Please use the simple form below as a guideline for describing your pull request.
Thanks for contributing to Draft.js!
Summary
[...]
Test Plan
[...]