From 8c5810f8c38ac97b0553d13d61ea81e5b0f826dc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 3 Feb 2020 08:42:06 +0530 Subject: [PATCH] Viewer: Stop autoscroll when changing page layout mode. Fixes #1861621 [Sudden position change when reading](https://bugs.launchpad.net/calibre/+bug/1861621) --- src/pyj/read_book/iframe.pyj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pyj/read_book/iframe.pyj b/src/pyj/read_book/iframe.pyj index 627b3344fa..1130130c88 100644 --- a/src/pyj/read_book/iframe.pyj +++ b/src/pyj/read_book/iframe.pyj @@ -198,6 +198,7 @@ class IframeBoss: self.jump_to_cfi = scroll_to_cfi self.anchor_funcs = flow_anchor_funcs self.auto_scroll_action = flow_auto_scroll_action + paged_auto_scroll_action('stop') else: self.do_layout = paged_layout self.handle_wheel = paged_onwheel @@ -207,6 +208,7 @@ class IframeBoss: self._handle_gesture = paged_handle_gesture self.anchor_funcs = paged_anchor_funcs self.auto_scroll_action = paged_auto_scroll_action + flow_auto_scroll_action('stop') update_settings(data.settings) self.keyboard_shortcut_map = create_shortcut_map(data.settings.keyboard_shortcuts) set_current_spine_item({