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 7

This 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

Comments

casey’s picture

StatusFileSize
new31.82 KB
casey’s picture

StatusFileSize
new31.82 KB
casey’s picture

Status: Active » Needs review
casey’s picture

Issue summary: View changes
droplet’s picture

a note from @Sun in this comment #2207629: Update matchMedia library to latest release, it should includes the commit hash

jhedstrom’s picture

Status: Needs review » Needs work

Needs work per #5.

hampercm’s picture

Issue summary: View changes
Priority: Normal » Critical
Status: Needs work » Needs review
Issue tags: +JavaScript, +blocker, +Needs manual testing
Parent issue: » #2203431: [meta] Various asset (JavaScript) libraries have to be updated to a (minified) stable release prior to 8.0.0
StatusFileSize
new10.42 KB

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

droplet’s picture

stefan.r’s picture

StatusFileSize
new6.44 KB
new9.91 KB

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

droplet’s picture

Status: Needs review » Reviewed & tested by the community
webchick’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +SprintWeekend2015

Great bugging, folks! ;)

Committed and pushed to 8.0.x. Thanks!

  • webchick committed 68c94f0 on 8.0.x
    Issue #2329599 by casey, stefan.r, hampercm, droplet: Update classList....

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

andypost’s picture