Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.6.4, 2.7.1
-
Component/s: JavaScript
-
Testing Instructions:
-
Affected Branches:MOODLE_26_STABLE, MOODLE_27_STABLE
-
Fixed Branches:MOODLE_26_STABLE, MOODLE_27_STABLE
-
Pull from Repository:
-
Pull Master Branch:wip_
MDL-46480_m28_footernan -
Pull Master Diff URL:
Description
Under lib/javascrip-static.js, L339, get_htmlelement_size function returns 'NaN' if #page-footer is set to 'display: none'.
To reproduce:
1. Set "Appearance / Theme / Custom CSS":
#page-footer
2. Set "Site policy URL" and "Site policy URL for quests".
3. Open /user/policy.php, you shouldn't see a policy content, as "iframe" height is set 0.
The issue with el.getComputedStyle(prop); which returns "auto".
Solution:
if (val == 'auto') {
val = el.getComputedStyle(prop);
// check val for int
if (!isNaN(parseInt(val)))
}
return parseInt(val);
Cheers