-
Notifications
You must be signed in to change notification settings - Fork 46.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed to !document.documentMode #7594
Conversation
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! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Have you verified that IE9 still works as intended? |
Seems good to me then 👍 |
Also, since contributors can’t commit, once you accept, you can merge. |
Thanks @gaearon, forgot to do that here 👍 |
(cherry picked from commit 8397ef5)
Just curious, but can anybody show me an evidence that Google Tag Manager changes the documentMode? I have checked their script and have found only read from this property, but not set. I am paying so much attention to this because it is not okay to blame for something, that he doesn't do actually. |
@just-boris I thought that it was GTM in this case but I don't have direct evidence to support that so I went ahead and took that out of the original comment. Thanks |
Line 124 of ChangeEventPlugin.js
isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 11);
Is incorrectly returning false in non-IE browsers when paired with some 3rd party code, specifically
!('documentMode' in document)
Is returning false because 3rd party code is setting document.documentMode to undefined. This is causing these errors on input fields
Uncaught TypeError: activeElement.detachEvent is not a function
TypeError·Uncaught TypeError: Cannot delete property 'value' of #
A better check in this case is
!document.documentMode
As this would still accomplish the intended check while minimizing conflicts with other codebases
I have found a couple of other instances of this issue:
#7421
#5920