Skip to content

Conversation

@mtsyganov
Copy link

Following changes were made to support old IE browsers IE6 and IE7

  1. Algorithm to distinguish user event value changes and JS value changes on INPUT and TEXTAREA in ChangeEventPlugin was reimplemented by using data-ie8_value attribute on DOMNode
  2. String[0] replaced by String.charAt(0) in setInnerHTML
  3. Added querySelectorAll polyfill
  4. Checking renderNode.hasAttribute extended by IE7 compatible attribute check
    To run react.js apps in IE6/IE7 you have to use es5-shims and console-polyfill

zpao and others added 30 commits July 17, 2014 13:47
(cherry picked from commit bd5e8aa)
Closes facebook#1859.

(cherry picked from commit 6d1ede3)
(cherry picked from commit 83fd558)
`_addPromise` is not used in the provided Dispatcher example, nor does it exist in Dispatcher.js found here: https://github.com/facebook/react/blob/master/examples/todomvc-flux/js/dispatcher/Dispatcher.js
(cherry picked from commit c94bb20)
Add PureRenderMixin and Perf to this page. Also, I think it's better if the link titles reflect the name used by these addons.

(cherry picked from commit d95a4ef)
(cherry picked from commit 495d866)
...when calling setState from within a componentWillMount. Fixes facebook#1866.

Test Plan: jest

(cherry picked from commit 54d91c2)
(cherry picked from commit e8efa2a)
Test Plan: Only failing tests in jest are immutable tests that were already failing.

(cherry picked from commit 6259d88)
Closes facebook#1926

(cherry picked from commit eb8f766)
* 0.11.1 blog post, changelog
* Update to 0.11.0 post, changelog
* Update version in site, add starter kit
(cherry picked from commit e30b60c)
(cherry picked from commit 0c4b272)
When I first read these docs, it was not immediately clear to me that I could
use `React.addons.CSSTransitionGroup` to animate a single item coming into view,
or an item replacing an item already there. This was partly due to the example
which rendered a list of items.

This PR adds a blurb about being able to use
`React.addons.CSSTransitionGroup` with one or zero items, provides a code
example, and adds a note blockquote that a `key` attribute must always be
provided on each child of `React.addons.CSSTransitionGroup`. The latter point
was not immediately obvious from the original `TodoList` code example, since it
renders a list which would normally require `key` attributes anyway.

Test Plan:
- Refreshed `http://localhost:4000/react/docs/animation.html`, saw that the
  docs additions rendered correctly.
- Example code not tested (it was extracted from working code).

(cherry picked from commit 721f397)
andrezsanchez and others added 15 commits August 12, 2014 15:15
(cherry picked from commit 6f49827)
Following changes were made to support old IE browsers IE6 and IE7
1. Algorithm to distinguish user event value changes and JS value
changes on INPUT and TEXTAREA in ChangeEventPlugin was reimplemented by
using data-ie8_value attribute on DOMNode
2. String[0] replaced by String.charAt(0) in setInnerHTML
3. Added querySelectorAll polyfill
4. Checking renderNode.hasAttribute extended by IE7 compatible attribute
check
To run react.js apps in IE6/IE7 you have to use es5-shims and
console-polyfill
Add support for <dialog> tag.
…mprove-ReactPerf-debugging

Improve debugging for methods using ReactPerf
@zpao
Copy link
Member

zpao commented Sep 4, 2014

This is currently in an unmergable state (looks like it was based on 0.11 branch originally). You would need to rebase it on master which shouldn't be too bad. Actually, I bet you probably just want to create a new branch from a clean master, and bring mtsyganov@703f382 into it.

Now that said, I'm pretty sure I don't want to take this. I think it's a commendable effort and I would be in support of you maintaining an IE6/7 compatible fork for others to use. But we (Facebook) dropped support for these browsers ~2 years ago and none of us has any desire to go back to that world. IE8 is bad enough. I'll leave this open for a bit of discussion but that's where I am.

@sophiebits
Copy link
Collaborator

I personally wouldn't mind having the charAt/hasAttribute fixes in the main repo. If it's possible to globally shim Element.prototype.querySelectorAll in old IE then it seems preferable to recommend that instead of inlining a polyfill here.

@mtsyganov It's unclear to me how your data-ie8_value tracking works. It looks like that stores only the last React-rendered value of the input and will incorrectly fire onChange if non-React JS code sets .value on the DOM node. Am I reading this wrong?

@zpao I agree that we shouldn't let IE6/IE7 hold us back, but having at least basic compatibility seems like it could be a nice feature, especially given that the necessary changes are small.

@mtsyganov
Copy link
Author

@zpao good suggestion. I will create a new branch from master and then a new pull request.

@spicyj you are right. If changes on .value are set over non-React JS code, React would fire onChange event. Let me correct this by implementing such behaviour only for dinasaurs browsers (IE6 and IE7).

@syranide
Copy link
Contributor

syranide commented Sep 4, 2014

@spicyj I think the idea is nice, but unless we commit to supporting IE6/7 then it will break again. Are we even sure that everything works as it should with just this PR? I imagine there are bunch of edge-cases that might not actually work as intended but doesn't show up in tests.

I agree with @zpao, the best course of action is for someone to maintain a separate branch and pull in compatible features from React once tested. Putting this restriction/burden on React seems counter-productive as most have given up on IE7 (including me), especially for newly started projects.

@mtsyganov
Copy link
Author

@syranide we have tested IE7 changes on our checkout application and could not find any issues.
The reason why we want to support IE7 in React is our windows tool, which opens the checkout process in a web container. The web container is using ActiveX component from IE7. Because we want one Checkout App for all kind of devices (iOS, Android, Mac, Desktop etc) its critical for us to have IE7 supported by React JS.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Daniel15
Copy link
Member

Daniel15 commented Sep 7, 2014

I think the best approach would be to maintain your own IE7-compatible branch and just pull in React's master every so often to keep it up-to-date. 👍

@spicyj - I wish Element.prototype.querySelectorAll was globally shimmable in old IE. Unfortunately IE7 and below don't expose these prototypes. Libraries like MooTools and Prototype worked around it by wrapping the native DOM elements in a wrapper object whenever you used the $ function to grab an element, but that ends up being pretty difficult to do correctly. I attempted the same thing myself a few years ago.

@mtsyganov
Copy link
Author

I have made a new PL2169

@mtsyganov
Copy link
Author

@Daniel15 I moved querySelectorAll to external lib. Works good with reactjs on IE7. See the new PL2169 for details.

@zpao
Copy link
Member

zpao commented Sep 15, 2014

I haven't changed my mind yet, but we can move further discussions over the the new PR.

@zpao zpao closed this Sep 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.