From f859b69af52cb0d91d34c991b7fd899befbed27d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Tue, 22 Apr 2025 19:03:40 +0800 Subject: [PATCH] fix: inline dead loop --- src/hooks/useTarget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useTarget.ts b/src/hooks/useTarget.ts index 10d4c11..682a596 100644 --- a/src/hooks/useTarget.ts +++ b/src/hooks/useTarget.ts @@ -47,7 +47,7 @@ export default function useTarget( const updatePos = useEvent(() => { if (targetElement) { // Exist target element. We should scroll and get target position - if (!isInViewPort(targetElement) && open) { + if (!inlineMode && !isInViewPort(targetElement) && open) { targetElement.scrollIntoView(scrollIntoViewOptions); }