From 50474f005c08b126c056031a4b5ba4d55ee48512 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 16 Nov 2023 16:57:54 +0530 Subject: [PATCH] Showing chrome should close an active footnote popup first and only show chrome if the user repeats the action. Fixes #2041848 [[Enchanement] E-book viewer: Esc should close the footnote window](https://bugs.launchpad.net/calibre/+bug/2041848) --- src/pyj/read_book/view.pyj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pyj/read_book/view.pyj b/src/pyj/read_book/view.pyj index b6359e73e3..3d8d86858b 100644 --- a/src/pyj/read_book/view.pyj +++ b/src/pyj/read_book/view.pyj @@ -719,6 +719,10 @@ class View: self.hints.show() def show_chrome(self, data): + if self.content_popup_overlay.is_visible: + self.content_popup_overlay.hide() + return + self.content_popup_overlay elements = {} if data and data.elements: elements = data.elements