mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-26 20:33:51 +01:00
Same work around for the search overlay in Chrome for Android
This commit is contained in:
parent
de6e5ec8d6
commit
f92f70da44
2 changed files with 5 additions and 1 deletions
|
|
@ -55,6 +55,10 @@ def container(self):
|
|||
def search_text(self):
|
||||
return self.container.querySelector('input').value
|
||||
|
||||
@property
|
||||
def is_visible(self):
|
||||
return self.container.style.display is not 'none'
|
||||
|
||||
def hide(self):
|
||||
self.container.style.display = 'none'
|
||||
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ def on_next_section(self, data):
|
|||
self.goto_named_destination(toc_node.dest, toc_node.frag)
|
||||
|
||||
def on_update_cfi(self, data):
|
||||
if self.overlay.is_visible:
|
||||
if self.overlay.is_visible or self.search_overlay.is_visible:
|
||||
# Chrome on Android stupidly resizes the viewport when the on
|
||||
# screen keyboard is displayed. This means that the push_state()
|
||||
# below causes the overlay to be closed, making it impossible to
|
||||
|
|
|
|||
Loading…
Reference in a new issue