The current version of classList contains a minified version that triggers an exception on IE9, and also is not up to date.
trimmedClasses = strTrim.call(elem.getAttribute("class") || "")
Is minified to
r=k.call(s.getAttribute("class"))
Which triggers exceptions in IE9:
SCRIPT5022: DrupalBehaviorError: attach ; activeLinks: String.prototype.trim: 'this' is null or undefined
drupal.js?v=8.0.0-dev, line 99 character 7This issue is marked as Critical because it blocks the completion of #2203431: [meta] Various asset (JavaScript) libraries have to be updated to a (minified) stable release prior to 8.0.0, which is also Critical.
Proposed resolution
Update the classList asset library to the latest release (2014-07-23)
Remaining tasks
Manual testing
User interface changes
None
API changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | update-classList-2329599-9.patch | 9.91 KB | stefan.r |
| #9 | interdiff.txt | 6.44 KB | stefan.r |
| #7 | update-classList-2329599-7.patch | 10.42 KB | hampercm |
| #2 | 2329599-update_class_list-2-do-not-test.patch | 31.82 KB | casey |
Comments
Comment #1
casey commentedComment #2
casey commentedComment #3
casey commentedComment #4
casey commentedComment #5
droplet commenteda note from @Sun in this comment #2207629: Update matchMedia library to latest release, it should includes the commit hash
Comment #6
jhedstromNeeds work per #5.
Comment #7
hampercm commentedThere is now a release of classList.js on GitHub, tagged as "2014-07-23". This patch updates classList to that release. I'm also associating this issue with #2203431: [meta] Various asset (JavaScript) libraries have to be updated to a (minified) stable release prior to 8.0.0, as this issue relates to updating a JavaScript asset library. This patch resolves the exception seen in IE9, and the concern from comment #5. Manual testing verified that the exception no longer occurs, and the "active" class is being correctly added to active links in IE9.
It was necessary to minify classList.js manually (using uglifyjs running on Ubuntu 14.04) to get the classList.min.js file included in this patch, as the classList.min.js tagged in the GitHub repo is from an older revision (see https://github.com/eligrey/classList.js/issues/33). This issue is with classList.min.js is fixed in the master branch of the GitHub repo, but has not been released yet. If necessary, we could open an issue on the GitHub repo asking the author to create a new tagged release with the minified code fix, and use that instead.
Hopefully I'm not hijacking this issue inappropriately, but it seemed like this would be cleaner than opening a more-or-less duplicate issue. I've updated this issue's Priority to Critical as it blocks the completion of #2203431: [meta] Various asset (JavaScript) libraries have to be updated to a (minified) stable release prior to 8.0.0, which is also Critical.
Comment #8
droplet commentedCool, @see: https://github.com/eligrey/classList.js/issues/35
Comment #9
stefan.r commentedA new version tagged "2014-12-13" has been tagged today after we bugged the maintainer in the issue listed above :)
This is harpercm's patch with the updated version, and without the readme file.
Comment #10
droplet commentedComment #11
webchickGreat bugging, folks! ;)
Committed and pushed to 8.0.x. Thanks!
Comment #14
andypostAnother update filed #2951857: Update classList.js to 1.2.20180112