mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-17 08:20:12 +00:00
fix: iterate the open overlays with Array.from so the type check passes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
50d48489b8
commit
65f6ecfd39
@@ -11,7 +11,7 @@ const OVERLAY =
|
||||
export function isComposerOverlay(target: EventTarget | null): boolean {
|
||||
if (target instanceof Element && target.closest(OVERLAY)) return true
|
||||
// An inert one is closed but kept mounted: the hidden sidebar's floating card is a dialog.
|
||||
return [...document.querySelectorAll(OVERLAY)].some((el) => !el.closest('[inert]'))
|
||||
return Array.from(document.querySelectorAll(OVERLAY)).some((el) => !el.closest('[inert]'))
|
||||
}
|
||||
|
||||
/** Whether a pointer-down outside the composer leaves it open: it is on a control that brings
|
||||
|
||||
Reference in New Issue
Block a user