Problem/Motivation

The new resizeListener added in 8.x-1.10 (Issue #3163958) is breaking IE11 since it's using ES6 features such as arrow functions. Although const and let would work in IE11 but I think in general we should try to maximise the script's compatibility with older browsers.

Steps to reproduce

Enable the module and open your site with IE11, you should see a 'Syntax error' error message in the console, throwing by the eu_cookie_compliance.js

Proposed resolution

Replace ES6 features with a more backward-compatible version of JavaScript code

Comments

peterwcm created an issue. See original summary.

peterwcm’s picture

Version: 8.x-1.10 » 8.x-1.12
peterwcm’s picture

don't think the ...args is being used at the moment so I removed that as well

peterwcm’s picture

Status: Active » Needs review

Status: Needs review » Needs work
peterwcm’s picture

Status: Needs work » Needs review
svenryen’s picture

Thanks. We'll take a look at it this week and release a new version.

svenryen’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.52 KB

Here's a patch for Drupal 7, same changes applied as in D8.

I reviewed the issue in IE11 for both 7.x and 8.x and it solves the problem.

  • svenryen committed 8dbd9ae on 7.x-1.x
    Issue #3178091 by peterwcm, svenryen: resizeListener breaks IE11
    

  • svenryen committed 5a4b899 on 8.x-1.x
    Issue #3178091 by peterwcm, svenryen: resizeListener breaks IE11
    
svenryen’s picture

Status: Reviewed & tested by the community » Fixed

  • svenryen committed 8dbd9ae on 7.x-2.x
    Issue #3178091 by peterwcm, svenryen: resizeListener breaks IE11
    
  • svenryen committed d6464b0 on 7.x-2.x
    Merge branch '7.x-1.x' into 7.x-2.x
    
    * 7.x-1.x:
      Issue #3178091 by...

Status: Fixed » Closed (fixed)

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