From b02eb9df01ede2b9fc4eeec16670074b07d0111d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 4 Oct 2019 13:12:52 +0530 Subject: [PATCH] Viewer: When there is empty text for an header footer section render it as blank instead of moving the remaining sections to the left --- src/pyj/read_book/prefs/head_foot.pyj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pyj/read_book/prefs/head_foot.pyj b/src/pyj/read_book/prefs/head_foot.pyj index 65d84ece95..4a5ee4a1f6 100644 --- a/src/pyj/read_book/prefs/head_foot.pyj +++ b/src/pyj/read_book/prefs/head_foot.pyj @@ -161,6 +161,8 @@ def render_head_foot(div, which, region, progress_frac, metadata, current_toc_no text = format_time_left(chapter_time) else: text = '{} ({})'.format(format_time_left(chapter_time), format_time_left(book_time)) + if not text: + text = '\xa0' if text is not div.textContent: div.textContent = text div.style.display = 'block' if text else 'none'