Ensure selection bar position is updated after a resize

This commit is contained in:
Kovid Goyal 2020-08-07 09:26:30 +05:30
parent 976012bdf4
commit 5361db6916
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -551,6 +551,11 @@ class IframeBoss:
paged_resize_done() paged_resize_done()
self.update_cfi() self.update_cfi()
self.update_toc_position() self.update_toc_position()
sel = window.getSelection()
if sel and not sel.isCollapsed:
# update_selection_position has probably already been called by
# no_latency_onscroll but make sure
self.send_message('update_selection_position', selection_extents=selection_extents(current_layout_mode() is 'flow', True))
def received_window_size(self, data): def received_window_size(self, data):
scroll_viewport.update_window_size(data.width, data.height) scroll_viewport.update_window_size(data.width, data.height)