From 27ff0e7241171b8464e131837cd661f362b821e2 Mon Sep 17 00:00:00 2001 From: MrTimscampi Date: Thu, 9 Jan 2020 22:24:45 +0100 Subject: [PATCH] Enable scrollManager in more cases --- src/components/scrollManager.js | 17 ++--------------- src/components/scroller.js | 2 +- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/components/scrollManager.js b/src/components/scrollManager.js index 9f7035d528..dbf9c5a143 100644 --- a/src/components/scrollManager.js +++ b/src/components/scrollManager.js @@ -372,7 +372,7 @@ define(["dom", "browser", "layoutManager"], function (dom, browser, layoutManage */ function useSmoothScroll() { - if (browser.tizen) { + if (browser.tizen || browser.web0s || browser.firefox || browser.chrome) { return true; } @@ -392,20 +392,7 @@ define(["dom", "browser", "layoutManager"], function (dom, browser, layoutManage * Returns true if scroll manager is enabled. */ var isEnabled = function() { - - if (!layoutManager.tv) { - return false; - } - - if (browser.tizen) { - return true; - } - - if (browser.web0s) { - return true; - } - - return false; + return layoutManager.tv; }; /** diff --git a/src/components/scroller.js b/src/components/scroller.js index 65f33b8e8d..b4c9b9d9b7 100644 --- a/src/components/scroller.js +++ b/src/components/scroller.js @@ -93,7 +93,7 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc // in cases with firefox, if the smooth scroll api is supported then use that because their implementation is very good if (options.allowNativeScroll === false) { options.enableNativeScroll = false; - } else if (isSmoothScrollSupported && ((browser.firefox && !layoutManager.tv) || options.allowNativeSmoothScroll)) { + } else if (isSmoothScrollSupported && (browser.firefox || options.allowNativeSmoothScroll)) { // native smooth scroll options.enableNativeScroll = true; } else if (options.requireAnimation && (browser.animate || browser.supportsCssAnimation())) {