With the latest version rc5 I am getting a js error in IE11

Object doesn't support property or method 'closest'

Reverting to rc4 works fine. Anyone else seeing this?

(I was unable to tag the version as rc5 for some reason...)

Thanks

CommentFileSizeAuthor
#6 blazy-ie11error-3085580-6.patch509 bytesmichiellucas

Comments

lindsaywilson23 created an issue. See original summary.

gausarts’s picture

Status: Active » Postponed (maintainer needs more info)

By the sound of it, appears to be another side issue from the previous commits.
Could you press F12, and view and copy the browser console for the exact error messages?

I may not be able to attend to it for a while. Patches are welcome. Thank you!

gausarts’s picture

Could you or anyone with IE11 please change this line:
https://git.drupalcode.org/project/blazy/blob/8.x-2.x/js/blazy.load.js#L116

var documentElement = elm.closest('html')
to:
var documentElement = _db.closest(elm, 'html');

And verify the issue resolved? Thanks!

lindsay.wils’s picture

Thanks for much for getting on this so quickly. Ive tested the js change on rc5 and it has fixed the issue!

Ive just glanced over the instructions on how to create a patch (never done it before) and unfortunately i wouldn't have time today to do that, but if you cant get to it, I can revisit next week.

gausarts’s picture

Issue tags: -JavaScript

Thanks for the confirmation! Patches are welcome in case anyone feeling invited to contribute.

michiellucas’s picture

StatusFileSize
new509 bytes

Thanks for the solution @guasarts.

created a patch here

gausarts’s picture

Thank you!
Please allow some time to get back into this.

lindsay.wils’s picture

Thanks for the patch @michiellucas, I have successfully applied it and can confirm it has fixed the errors in IE11.

anruether’s picture

Version: 8.x-2.0-rc4 » 8.x-2.0-rc5
Status: Postponed (maintainer needs more info) » Active

Setting correct status and version

anruether’s picture

Status: Active » Reviewed & tested by the community

#6 works for me. Thanks!

  • gausarts committed 583313e on 8.x-2.x authored by michiellucas
    Issue #3085580 by michiellucas, lindsaywilson23, anruether: IE 11: Js...
gausarts’s picture

Status: Reviewed & tested by the community » Fixed

Sorry for delay.

Committed. Thank you for contribution!

Status: Fixed » Closed (fixed)

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