mirror of
https://github.com/moodle/moodle.git
synced 2025-07-13 18:36:34 +02:00
MDL-46480 fix get_htmlelement_size() to deal with hidden or non-block elements
This commit is contained in:
@ -332,7 +332,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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user