mirror of
https://github.com/moodle/moodle.git
synced 2025-07-14 02:46:30 +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') {
|
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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user