media-explorer icon indicating copy to clipboard operation
media-explorer copied to clipboard

Check element is link before return

Open mattheu opened this issue 9 years ago • 0 comments

On IE11, you cannot select an item by clicking on the actual thumbnail image in the explorer. It works fine if you click the title, or the area around the image.

I think this problem is caused by a quirk in IE, where event.target.href returns the image src. As you are checking this isn't empty befor toggling the selection, this breaks on IE.

A simple fix is to check that the event target with an href is also a link element.

mattheu avatar Sep 04 '15 09:09 mattheu