From 2d403e9d642328d26fba90152d428f5965da36d8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 19 May 2017 10:48:22 +0530 Subject: [PATCH] Fix iframe's too large in book details panel on Firefox --- src/pyj/book_list/book_details.pyj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pyj/book_list/book_details.pyj b/src/pyj/book_list/book_details.pyj index f3b9280479..39ad0f1763 100644 --- a/src/pyj/book_list/book_details.pyj +++ b/src/pyj/book_list/book_details.pyj @@ -92,7 +92,8 @@ def on_fmt_click(ev): def adjust_iframe_height(iframe): de = iframe.contentWindow.document.documentElement - iframe.style.height = max(de.scrollHeight, de.offsetHeight) + 5 + 'px' + # scrollHeight is inaccurate on Firefox + iframe.style.height = de.offsetHeight + 5 + 'px' iframe.dataset.last_window_width = window.innerWidth + ''