mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Fix iframe's too large in book details panel on Firefox
This commit is contained in:
parent
e13ae2da4e
commit
2d403e9d64
@ -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 + ''
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user