I get an error on a dialog for Internet Explorer 11 only which fails to open the dialog. To fix that i have added an if condition.

if (typeof trigger.getAttributeNames === 'function') {
      var data = trigger.getAttributeNames().filter(function (name) {
          return name.startsWith('data-');
        }).reduce(function (data, name) {
          data[name] = trigger.getAttribute(name);
          return data;
        }, {});
        attributes.merge(data);
}
CommentFileSizeAuthor
#9 3131957-9.patch1.26 KBmarkhalliwell
#2 3131957-2.patch950 byteshash6

Comments

hash6 created an issue. See original summary.

hash6’s picture

StatusFileSize
new950 bytes
hash6’s picture

Status: Needs work » Needs review
mahmoud barhouma’s picture

The patch worked with me, thank you a lot.

hash6’s picture

Assigned: hash6 » Unassigned
hash6’s picture

Issue summary: View changes
bhumikavarshney’s picture

Status: Needs review » Reviewed & tested by the community

Hi,
The above Patch works for me.
Thanks.

markhalliwell’s picture

Priority: Normal » Minor
Status: Reviewed & tested by the community » Needs work
Issue tags: +internet exploder

Thanks for the patch! It appears that IE has struck again. However, simply removing functionality by wrapping it in an if statement isn't a proper fix though.

This will need to be refactored so it iterates over trigger.attributes manually, something like:

var data = {};
for (var i = 0, l = trigger.attributes.length; i < l; i++) {
  var name = trigger.attributes[i].name;
  if (name.substring(0, 5) === 'data-') {
    data[name] = trigger.getAttribute(name);
  }
}
markhalliwell’s picture

Status: Needs work » Fixed
StatusFileSize
new1.26 KB
markhalliwell’s picture

Version: 8.x-3.21 » 8.x-3.x-dev

  • markcarver committed 49a14ad on 8.x-4.x
    Issue #3131957 by markcarver, hash6: SCRIPT438: Object doesn't support...

  • markcarver committed b5d5640 on 8.x-3.x
    Issue #3131957 by markcarver, hash6: SCRIPT438: Object doesn't support...

Status: Fixed » Closed (fixed)

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