diff --git a/packages/rax-scrollview/package.json b/packages/rax-scrollview/package.json index f1817e13..e92ba574 100644 --- a/packages/rax-scrollview/package.json +++ b/packages/rax-scrollview/package.json @@ -1,6 +1,6 @@ { "name": "rax-scrollview", - "version": "3.7.1", + "version": "3.7.2", "description": "ScrollView component for Rax.", "license": "BSD-3-Clause", "main": "lib/index.js", diff --git a/packages/rax-scrollview/src/web/index.tsx b/packages/rax-scrollview/src/web/index.tsx index 3a966776..8c301b61 100644 --- a/packages/rax-scrollview/src/web/index.tsx +++ b/packages/rax-scrollview/src/web/index.tsx @@ -247,16 +247,12 @@ const ScrollView: ForwardRefExoticComponent = forwardRef( } scrollerStyle.WebkitOverflowScrolling = 'touch'; - if (horizontal) { - scrollerStyle.overflowX = 'scroll'; - scrollerStyle.overflowY = 'hidden'; - } else { - scrollerStyle.overflowX = 'hidden'; - scrollerStyle.overflowY = 'scroll'; - } if (disableScroll) { scrollerStyle.overflow = 'hidden'; + } else { + scrollerStyle.overflowX = horizontal ? 'scroll' : 'hidden'; + scrollerStyle.overflowY = horizontal ? 'hidden' : 'scroll'; } const webProps = {