From 6ad20e72a75698c1d7a8f109f2ba6322e32e5eaa Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Mon, 20 Aug 2018 17:57:38 -0700 Subject: [PATCH] don't use rIC while scrolling (#455) * don't use rIC while scrolling * remove unnecessary import --- routes/_components/virtualList/VirtualListContainer.html | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/routes/_components/virtualList/VirtualListContainer.html b/routes/_components/virtualList/VirtualListContainer.html index 8eeb0dd..90aad33 100644 --- a/routes/_components/virtualList/VirtualListContainer.html +++ b/routes/_components/virtualList/VirtualListContainer.html @@ -4,8 +4,6 @@ import throttle from 'lodash-es/throttle' import { isFullscreen, attachFullscreenListener, detachFullscreenListener } from '../../_utils/fullscreen' import { mark, stop } from '../../_utils/marks' - import { scheduleIdleTask } from '../../_utils/scheduleIdleTask' - import { isMobile } from '../../_utils/isMobile' import { doubleRAF } from '../../_utils/doubleRAF' import { observe } from 'svelte-extras' @@ -95,12 +93,7 @@ onScroll (event) { let { scrollTop, scrollHeight } = event.target - // On mobile devices, this can make scrolling more responsive. On - // desktop browsers... it's probably overkill, and can lead to a - // checkerboarding issue ("I just scrolled, why is it blank for 5 seconds?"). - let runTask = isMobile() ? scheduleIdleTask : requestAnimationFrame - - runTask(() => { + doubleRAF(() => { mark('onScroll -> setForRealm()') this.store.setForRealm({scrollTop, scrollHeight}) stop('onScroll -> setForRealm()')