From 2bd826b821f2d0765bf879165eee08ada63cbc45 Mon Sep 17 00:00:00 2001 From: chirokas <157580465+chirokas@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:07:23 +0000 Subject: [PATCH] fix: correct scrollable element check condition --- packages/@react-aria/overlays/src/usePreventScroll.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@react-aria/overlays/src/usePreventScroll.ts b/packages/@react-aria/overlays/src/usePreventScroll.ts index ad4f4cdd74e..0b9ad8825a4 100644 --- a/packages/@react-aria/overlays/src/usePreventScroll.ts +++ b/packages/@react-aria/overlays/src/usePreventScroll.ts @@ -110,7 +110,7 @@ function preventScrollMobileSafari() { let onTouchStart = (e: TouchEvent) => { // Store the nearest scrollable parent element from the element that the user touched. scrollable = getScrollParent(e.target as Element, true); - if (scrollable === document.documentElement && scrollable === document.body) { + if (scrollable === document.documentElement || scrollable === document.body) { return; }