style: fix resizing of pdf.js iframe in Chrome (#12615)

This commit is contained in:
Frédéric Péters 2016-07-17 11:48:16 +02:00
parent 012d67666f
commit 19144aea15
1 changed files with 2 additions and 1 deletions

View File

@ -37,7 +37,8 @@ $('div.cell').delegate('h2', 'click', function() {
$(window).on('resize', function() {
if ($('.top iframe').length == 1) {
var top_form_height = $('.top form').height();
$('.top iframe').css('height', 'calc(100% - ' + top_form_height + 'px)');
var top_height = $('.top > div').height();
$('.top iframe').css('height', top_height - top_form_height);
} else {
$('iframe').css('height', '100%');
}