From 02b66f2be4d64073dba2654bfcc4223832e2e9e1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 27 May 2017 22:09:54 +0530 Subject: [PATCH] Scroll notifications for scrolling in paged mode on Safari --- src/pyj/read_book/globals.pyj | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/pyj/read_book/globals.pyj b/src/pyj/read_book/globals.pyj index f9bb70655a..dad4f011ed 100644 --- a/src/pyj/read_book/globals.pyj +++ b/src/pyj/read_book/globals.pyj @@ -65,12 +65,15 @@ if is_ios: paged_viewport_scroll_to = def (x, y): if x is 0: document.documentElement.style.transform = 'none' - return - x *= -1 - document.documentElement.style.transform = f'translateX({x}px)' + else: + x *= -1 + document.documentElement.style.transform = f'translateX({x}px)' + boss = get_boss() + if boss: + boss.onscroll() paged_viewport_x = def(): raw = document.documentElement.style.transform - if not raw: + if not raw or raw is 'none': return 0 raw = raw[12:] ans = parseInt(raw)