From e61d85a8901005e1d0642af9a90db24782bd6a2b Mon Sep 17 00:00:00 2001 From: AmazingPromise <907953320@qq.com> Date: Sat, 25 Jun 2022 11:44:11 +0800 Subject: [PATCH] fix(List): element with `overflow: overlay` style should be considered a scroll container (#10743) --- packages/vant-use/src/useScrollParent/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vant-use/src/useScrollParent/index.ts b/packages/vant-use/src/useScrollParent/index.ts index 7974d4060..e8d4b1c29 100644 --- a/packages/vant-use/src/useScrollParent/index.ts +++ b/packages/vant-use/src/useScrollParent/index.ts @@ -3,7 +3,7 @@ import { inBrowser } from '../utils'; type ScrollElement = HTMLElement | Window; -const overflowScrollReg = /scroll|auto/i; +const overflowScrollReg = /scroll|auto|overlay/i; const defaultRoot = inBrowser ? window : undefined; function isElement(node: Element) {