In version 4.6.3, you could mix content in a Fotorama slider. IMGs, then . This worked fine.
In version 4.6.4, any HTML slides (non images or anchor links), now trip up the script.
Uncaught TypeError: Cannot read property 'attr' of null
The function "getDimensions", close to line 1207 in "fotorama.min.js", now attempts to check for attributes for "alt" and "title" of a child element, but the function that calls this, sends a null as the object, so checking for attributes on a null element cause it to crash.
function getDimensions ($img, $child, imgData) {
var separateThumbFLAG = imgData.thumb && imgData.img !== imgData.thumb,
width = numberFromMeasure(imgData.width || $img.attr('width')),
height = numberFromMeasure(imgData.height || $img.attr('height')),
alt = $child.attr('alt'),
title = $child.attr('title');
if (alt) { $.extend(imgData, { alt: alt }); }
if (title) { $.extend(imgData, { title: title }); }
$.extend(imgData, {
width: width,
height: height,
thumbratio: getRatio(imgData.thumbratio || (numberFromMeasure(imgData.thumbwidth || ($child && $child.attr('width')) || separateThumbFLAG || width) / numberFromMeasure(imgData.thumbheight || ($child && $child.attr('height')) || separateThumbFLAG || height)))
});
The two lines, "alt = $child.atr('alt')" and 'title = $child.attr('title')" trigger this error. HTML slides are sent to "getDimensions" with a Null child.
There should be a check in place to make sure a child exists, before attempting to get their attributes.
(My apologies, this is my first time submitting an issue. I hope this is okay?)
In version 4.6.3, you could mix content in a Fotorama slider. IMGs, then. This worked fine.
In version 4.6.4, any HTML slides (non images or anchor links), now trip up the script.
Uncaught TypeError: Cannot read property 'attr' of null
The function "getDimensions", close to line 1207 in "fotorama.min.js", now attempts to check for attributes for "alt" and "title" of a child element, but the function that calls this, sends a null as the object, so checking for attributes on a null element cause it to crash.
The two lines, "alt = $child.atr('alt')" and 'title = $child.attr('title')" trigger this error. HTML slides are sent to "getDimensions" with a Null child. There should be a check in place to make sure a child exists, before attempting to get their attributes.
(My apologies, this is my first time submitting an issue. I hope this is okay?)