angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

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

Open fbenz opened this issue 13 years ago • 9 comments

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 c785267eb8780d8b7658ef93ebb5ebddd566294d

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

fbenz avatar Oct 21 '13 13:10 fbenz

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.

nosideeffects avatar Oct 21 '13 22:10 nosideeffects

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.

fbenz avatar Oct 22 '13 07:10 fbenz

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.

nosideeffects avatar Oct 22 '13 07:10 nosideeffects

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.

fbenz avatar Oct 22 '13 07:10 fbenz

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

nosideeffects avatar Oct 22 '13 16:10 nosideeffects

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).

grantyb avatar Nov 14 '13 02:11 grantyb

Currently, we use a patch that basically reverts https://github.com/angular/angular.js/commit/c785267eb8780d8b7658ef93ebb5ebddd566294d 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.

fbenz avatar Nov 15 '13 11:11 fbenz

@fbenz - thanks for the heads up

scottywakefield avatar Nov 22 '13 13:11 scottywakefield

We don't support IE7.

btford avatar Dec 20 '13 00:12 btford