Scroll notifications for scrolling in paged mode on Safari

This commit is contained in:
Kovid Goyal 2017-05-27 22:09:54 +05:30
parent ba1341f5d4
commit 02b66f2be4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -65,12 +65,15 @@ if is_ios:
paged_viewport_scroll_to = def (x, y):
if x is 0:
document.documentElement.style.transform = 'none'
return
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)