From f792eb5ae7461ec26be52bf7facc42450043756e Mon Sep 17 00:00:00 2001 From: Andelf Date: Sat, 19 Feb 2022 02:17:43 +0800 Subject: [PATCH] fix: also check overflowY: overlay in detectScroll (#4806) * fix: also check overflowY: overlay in detectScroll * fix lint Co-authored-by: dwelle --- src/utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 5dc9333c..3d3cecd5 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -475,7 +475,9 @@ export const getNearestScrollableContainer = ( const hasScrollableContent = parent.scrollHeight > parent.clientHeight; if ( hasScrollableContent && - (overflowY === "auto" || overflowY === "scroll") + (overflowY === "auto" || + overflowY === "scroll" || + overflowY === "overlay") ) { return parent; }