From 451d39e2912ac647d0c8ae1411cd5e177f026adb Mon Sep 17 00:00:00 2001 From: Jimmy Wilson Date: Tue, 23 Feb 2021 14:55:16 -0800 Subject: [PATCH] Fix for range input types Force inputs with the type range to be always be scrollable on the horizontal plane --- src/handleScroll.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/handleScroll.ts b/src/handleScroll.ts index 254b141..2d13632 100644 --- a/src/handleScroll.ts +++ b/src/handleScroll.ts @@ -10,6 +10,9 @@ const elementCouldBeVScrolled = (node: HTMLElement): boolean => { const elementCouldBeHScrolled = (node: HTMLElement): boolean => { const styles = window.getComputedStyle(node); + if (node.type === "range") { + return true; + } return ( styles.overflowX !== 'hidden' && // not-not-scrollable !(styles.overflowY === styles.overflowX && styles.overflowX === 'visible') // scrollable