MDL-46480 fix get_htmlelement_size() to deal with hidden or non-block elements

This commit is contained in:
Petr Skoda
2014-08-08 10:28:11 +12:00
parent d29fb4ac65
commit 70a63f0eef

View File

@ -332,7 +332,11 @@ M.util.init_maximised_embed = function(Y, id) {
if (val == 'auto') { if (val == 'auto') {
val = el.getComputedStyle(prop); val = el.getComputedStyle(prop);
} }
return parseInt(val); val = parseInt(val);
if (isNaN(val)) {
return 0;
}
return val;
} else { } else {
return 0; return 0;
} }