Skip to content

Commit

Permalink
Documents: Fix iframe height fix BT#18486
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Mar 26, 2021
1 parent 0e53ffe commit 6139088
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main/document/showinframes.php
Expand Up @@ -238,7 +238,8 @@
$(function() {
$(\'#mainFrame\').on(\'load\', function () {
let currentHeight = this.style.height;
let frameHeight = this.contentWindow.document.body.scrollHeight + 50;
currentHeight = parseInt(currentHeight, 10);
let frameHeight = parseInt(this.contentWindow.document.body.scrollHeight) + 50;
if (frameHeight > currentHeight) {
this.style.height = frameHeight + \'px\';
}
Expand Down

1 comment on commit 6139088

@ywarnier
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this creates the opposite issue (low frame height) when the document contains other iframes (weirdly). Reported personally. Fix to be sent later.

Please sign in to comment.