mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Same work around for the search overlay in Chrome for Android
This commit is contained in:
parent
de6e5ec8d6
commit
f92f70da44
@ -55,6 +55,10 @@ class SearchOverlay:
|
|||||||
def search_text(self):
|
def search_text(self):
|
||||||
return self.container.querySelector('input').value
|
return self.container.querySelector('input').value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def is_visible(self):
|
||||||
|
return self.container.style.display is not 'none'
|
||||||
|
|
||||||
def hide(self):
|
def hide(self):
|
||||||
self.container.style.display = 'none'
|
self.container.style.display = 'none'
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ class View:
|
|||||||
self.goto_named_destination(toc_node.dest, toc_node.frag)
|
self.goto_named_destination(toc_node.dest, toc_node.frag)
|
||||||
|
|
||||||
def on_update_cfi(self, data):
|
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
|
# Chrome on Android stupidly resizes the viewport when the on
|
||||||
# screen keyboard is displayed. This means that the push_state()
|
# screen keyboard is displayed. This means that the push_state()
|
||||||
# below causes the overlay to be closed, making it impossible to
|
# below causes the overlay to be closed, making it impossible to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user