I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 46ca3ab5 authored by str4d's avatar str4d
Browse files

Used JS changes to fix iframed i2ptunnel scrollbar issue in CSS

Also added comments to the JS to point out that the issue is that
offsetHeight doesn't include the very top or bottom margins.
parent 0deaab7c
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,10 @@
doc.getElementsByClassName('panel')[0].className += ' iframed';
}
function resizeFrame(f) {
// offsetHeight returns the height of the visible area for an object, in pixels.
// The value contains the height with the padding, scrollBar, and the border,
// but does not include the margin. Therefore, any content within the iframe
// should have no margins at the very top or very bottom to avoid a scrollbar.
var doc = 'contentDocument' in f? f.contentDocument : f.contentWindow.document;
f.style.height = doc.body.offsetHeight + "px";
}
......
......@@ -27,6 +27,10 @@
doc.body.className += ' iframed';
}
function resizeFrame(f) {
// offsetHeight returns the height of the visible area for an object, in pixels.
// The value contains the height with the padding, scrollBar, and the border,
// but does not include the margin. Therefore, any content within the iframe
// should have no margins at the very top or very bottom to avoid a scrollbar.
var doc = 'contentDocument' in f? f.contentDocument : f.contentWindow.document;
f.style.height = doc.body.offsetHeight + "px";
}
......
......@@ -1321,3 +1321,7 @@ div.applabel {
}
/* end home page */
iframe.iframed {
margin: 15px 0 0;
}
......@@ -225,6 +225,10 @@ hr {
margin: 16px auto -8px auto !important;
}
.iframed .panel.iframed {
margin: 0 auto -8px auto !important;
}
.panel td:first-child {
font-weight: bold;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment