Fix incorrect single screen detection

This detection runs on first layout, before columns are created,
therefore, the block direction is the appropriate thing to check
This commit is contained in:
Kovid Goyal 2020-08-14 08:09:30 +05:30
parent 448651d2fc
commit 7359b314b3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -203,8 +203,7 @@ def layout(is_single_page, on_resize):
handle_rtl_body(body_style)
# Check if the current document is a full screen layout like
# cover, if so we treat it specially.
# (The inline size is the column direction, so it's the appropriate thing to check to make sure we don't have multiple columns)
single_screen = (scroll_viewport.document_inline_size() < scroll_viewport.inline_size() + 75)
single_screen = (scroll_viewport.document_block_size() < scroll_viewport.block_size() + 75)
first_layout = True
svgs = document.getElementsByTagName('svg')
has_svg = svgs.length > 0