diff --git a/src/pyj/read_book/paged_mode.pyj b/src/pyj/read_book/paged_mode.pyj index 9d87088bbb..4cd35d220a 100644 --- a/src/pyj/read_book/paged_mode.pyj +++ b/src/pyj/read_book/paged_mode.pyj @@ -282,6 +282,8 @@ def layout(is_single_page, on_resize): # the window inline dimension, with their separator margins wi = col_size = screen_inline = scroll_viewport.inline_size() margin_size = (opts.margin_left + opts.margin_right) if scroll_viewport.horizontal_writing_mode else (opts.margin_top + opts.margin_bottom) + # a zero margin causes scrolling issues, see https://bugs.launchpad.net/calibre/+bug/1918437 + margin_size = max(1, margin_size) gap = margin_size if n > 1: # Adjust the margin so that the window inline dimension satisfies