Skip to content
Snippets Groups Projects
Commit 0cf45e67 authored by uhensler's avatar uhensler
Browse files

OO-5180: Better calculation of the document height

e.g. course element title is respected
parent e249551d
No related branches found
No related tags found
No related merge requests found
......@@ -26,11 +26,13 @@
<script>
/* <![CDATA[ */
b_resizeIframeToMainMaxHeight("cndContent");
var contentHeight = jQuery('#o_main_center_content').height();
var contentHeight = jQuery('#cndContent').height();
document.documentElement.style.setProperty('--cndcontentheight', `${contentHeight}px`);
jQuery(document).on("oo.window.resize.after", () => {
## reset height to a small value
jQuery('#cndContent').height('100px');
b_resizeIframeToMainMaxHeight("cndContent");
var contentHeight = jQuery('#o_main_center_content').height();
var contentHeight = jQuery('#cndContent').height();
document.documentElement.style.setProperty('--cndcontentheight', `${contentHeight}px`);
});
/* ]]> */
......
......@@ -48,7 +48,7 @@ body.o_doceditor_body {
iframe {
width: 100%;
height: 800px; // Fallback if css variable not supported
height: calc(var(--cndcontentheight) - 90px);
height: calc(var(--cndcontentheight));
margin-top: 0px;
margin-bottom: 0px;
border-width: 1px;
......
This diff is collapsed.
source diff could not be displayed: it is too large. Options to address this: view the blob.
This diff is collapsed.
source diff could not be displayed: it is too large. Options to address this: view the blob.
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