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:29:17 +12:00
parent 753493ae11
commit 8f73f2a160
+5 -1
View File
@@ -346,7 +346,11 @@ M.util.init_maximised_embed = function(Y, id) {
if (val == 'auto') {
val = el.getComputedStyle(prop);
}
return parseInt(val);
val = parseInt(val);
if (isNaN(val)) {
return 0;
}
return val;
} else {
return 0;
}