fix: also check overflowY: overlay in detectScroll (#4806)

* fix: also check overflowY: overlay in detectScroll

* fix lint

Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
Andelf 2022-02-19 02:17:43 +08:00 committed by GitHub
parent 4604c8d823
commit f792eb5ae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}