diff --git a/src/client/core/utils/shared/scroll.ts b/src/client/core/utils/shared/scroll.ts index 96e437060b..eab7ba3f30 100644 --- a/src/client/core/utils/shared/scroll.ts +++ b/src/client/core/utils/shared/scroll.ts @@ -2,7 +2,7 @@ import adapter from './adapter/index'; import AxisValues from '../../../../shared/utils/values/axis-values'; -const SCROLLABLE_OVERFLOW_STYLE_RE = /auto|scroll/i; +const SCROLLABLE_OVERFLOW_STYLE_RE = /auto|scroll|hidden/i; const DEFAULT_IE_SCROLLABLE_OVERFLOW_STYLE_VALUE = 'visible'; function getScrollable (el: Element): AxisValues { @@ -40,7 +40,7 @@ function hasBodyScroll (el: HTMLBodyElement): boolean { } return (scrollableHorizontally || scrollableVertically) && - bodyScrollHeight > documentElement.scrollHeight; + bodyScrollHeight > documentElement.scrollHeight; } function hasHTMLElementScroll (el: HTMLHtmlElement): boolean { diff --git a/test/functional/fixtures/api/es-next/scroll/pages/scroll-automations.html b/test/functional/fixtures/api/es-next/scroll/pages/scroll-automations.html index 9a315ea96a..a7a7eab3bc 100644 --- a/test/functional/fixtures/api/es-next/scroll/pages/scroll-automations.html +++ b/test/functional/fixtures/api/es-next/scroll/pages/scroll-automations.html @@ -20,6 +20,13 @@ border: 1px solid black; } + #hidden { + height: 500px; + width: 500px; + overflow: hidden; + border: 1px solid black; + } + #scrollable-deferred { height: 500px; width: 500px; @@ -41,6 +48,15 @@ left: 700px; position: absolute; } + + #hidden-target { + width: 1000px; + height: 1000px; + background-color: black; + top: 700px; + left: 700px; + position: absolute; + } @@ -50,6 +66,11 @@
+
+
+
+
+