Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove vertical scrollbar (for unit tests) #599

Closed
wants to merge 14 commits into from
Prev Previous commit
Next Next commit
Set overflowY explicitly
  • Loading branch information
Jaifroid committed Mar 14, 2020
commit fb20bf8ade37d293dbf4436cfcbc6a535069cac3
7 changes: 4 additions & 3 deletions www/js/app.js
Original file line number Diff line number Diff line change
@@ -95,15 +95,16 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'cookies','abstractFilesystemAcc
if (iframe.style.display === 'none') {
// We are in About or Configuration, so we only set the region height
region.style.height = window.innerHeight + 'px';
region.style.overflowY = 'auto';
} else {
// IE cannot retrieve computed headerStyles till the next paint, so we wait a few ticks
setTimeout(function() {
// Get header height *including* its bottom margin
var headerHeight = parseFloat(headerStyles.height) + parseFloat(headerStyles.marginBottom);
iframe.style.height = window.innerHeight - headerHeight + 'px';
// We have to allow a minimum safety margin of 5px for 'iframe' and 'header'
// to fit within 'region' without displaying an overflow
region.style.height = window.innerHeight + 5 + 'px';
// We have to allow a minimum safety margin of 10px for 'iframe' and 'header' to fit within 'region'
region.style.height = window.innerHeight + 10 + 'px';
region.style.overflowY = 'hidden';
}, 100);
}
}