Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

angularjs1.2.0-rc.3 regression: JQLite[...]Class functions do not work in IE7 #4562

Closed
fbenz opened this issue Oct 21, 2013 · 9 comments
Closed

Comments

@fbenz
Copy link

fbenz commented Oct 21, 2013

This is a regression from RC2 to RC3. The functions JQLiteHasClass, JQLiteAddClass, JQLiteRemoveClass do not work anymore in IE7 because they use setAttribute and getAttribute. One of the results is that ng-show does not work in IE7.

The issue has been introduced by commit c785267

Commit 64fd2c4 is related as it adds checks for the existance of getAttribute or setAttribute function does exist.

@nosideeffects
Copy link
Contributor

I know that in the past AngularJS has somewhat functioned properly IE7, if you polyfilled the appropriate methods and wrote your app a certain way.

However, it does not officially attempt to support IE7. If you need your Angular application to continue to function in IE7, override these particular functions yourself or include jQuery 1.x.

@fbenz
Copy link
Author

fbenz commented Oct 22, 2013

I found no statement on the support of IE versions. The only thing that is made clear is that one needs some extra steps to run Angular apps in IE8 or earlier. If something like ng-show does not work in IE7 anymore, I would appreciate a clear statement in the documentation that AngularJS does not work with IE7.

We are using jQuery 1.x. But as the JQLite[...]Class functions are used directly and are therefore not replaced by the jQuery counterparts, loading jQuery before does not help.

I see two issues here:

  1. The direct use of the jqLite functions internally. For me this is against the intention behind jqLite, namely that it is only there to avoid a strict dependency on jQuery. From the documentation:
    "jqLite is a tiny, API-compatible subset of jQuery that allows Angular to manipulate the DOM in a cross-browser compatible way. jqLite implements only the most commonly needed functionality with the goal of having a very small footprint."
  2. jqLite functions that do not support IE7 anymore. I cannot argue against this one if IE7 is not supported.

@nosideeffects
Copy link
Contributor

From the FAQ:

What browsers does Angular work with?

We run our extensive test suite against the following browsers: Safari, Chrome, Firefox, Opera, IE8, IE9 and mobile browsers (Android, Chrome Mobile, iOS Safari).

If you look at the source, they do not run tests against IE7, either. IE7 and IE7 standards mode in IE8+ will likely to continue to break in the future, since it is not part of the test suite and unlikely to be re-added. I am simply trying to let you know that if you truly want/need IE7 support, providing the necessary testing/fixes will be up to you and others in your position.

@fbenz
Copy link
Author

fbenz commented Oct 22, 2013

Thank you, I somehow missed that FAQ entry when scanning the documentation. We are planning on dropping IE7 support for our site, but until that happens I have to do some extra work.

@nosideeffects
Copy link
Contributor

Good luck! Hopefully IE7 won't be your problem for much longer!

@grantyb
Copy link

grantyb commented Nov 14, 2013

I've just encountered this issue. Is there a workaround? We should add this IE7 caveat to the http://docs.angularjs.org/guide/ie documentation, especially if there's a solution (other than using ng-if instead of ng-show and ng-hide).

@fbenz
Copy link
Author

fbenz commented Nov 15, 2013

Currently, we use a patch that basically reverts c785267 Thus, the patch breaks the SVG test, but we do not use this functionality.

However, we decided to do no further patching and show a message to IE7 users. This works in our case, because we only use AngularJS to add features to existing sites.

@scottywakefield
Copy link
Contributor

@fbenz - thanks for the heads up

@btford
Copy link
Contributor

btford commented Dec 20, 2013

We don't support IE7.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants