From e5259dfcb56a2c287a7de54186cc513c77834d0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20S=C3=A1nchez=20Ortega?= Date: Thu, 23 Feb 2023 14:56:27 +0100 Subject: [PATCH] Update wheelPxFactor on Linux+Chrome MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #8859 Signed-off-by: Iván Sánchez Ortega --- src/dom/DomEvent.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/dom/DomEvent.js b/src/dom/DomEvent.js index 82be08975..eb5ce82df 100644 --- a/src/dom/DomEvent.js +++ b/src/dom/DomEvent.js @@ -264,11 +264,10 @@ export function getMousePosition(e, container) { // @function getWheelPxFactor(): Number // Gets the wheel pixel factor based on the devicePixelRatio export function getWheelPxFactor() { - // We need double the scroll pixels (see #7403 and #4538) for all Browsers - // except OSX (Mac) -> 3x, Chrome running on Linux 1x + // We need double the scroll pixels (see #8859, #7403 and #4538) for all Browsers + // except OSX (Mac) -> 3x const ratio = window.devicePixelRatio; - return Browser.linux && Browser.chrome ? ratio : - Browser.mac ? ratio * 3 : + return Browser.mac ? ratio * 3 : ratio > 0 ? 2 * ratio : 1; }