mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 16:02:32 +00:00
fix(ui): ignore the persistent workspace list when detecting overlays (#18881)
This commit is contained in:
@@ -30,6 +30,16 @@ describe('hasVisibleOverlay', () => {
|
||||
expect(hasVisibleOverlay()).toBe(false)
|
||||
})
|
||||
|
||||
it('ignores the persistent workspace list while preserving its nested popups', () => {
|
||||
mount('<div role="listbox" data-worktree-sidebar></div>')
|
||||
|
||||
expect(hasVisibleOverlay()).toBe(false)
|
||||
|
||||
mount('<div role="listbox" data-worktree-sidebar><div role="menu"></div></div>')
|
||||
|
||||
expect(hasVisibleOverlay()).toBe(true)
|
||||
})
|
||||
|
||||
it('ignores a display:none overlay', () => {
|
||||
mount('<div role="dialog" style="display: none"></div>')
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const OVERLAY_SELECTOR = '[role="dialog"], [role="alertdialog"], [role="listbox"], [role="menu"]'
|
||||
// The always-mounted worktree sidebar is page chrome, not an Escape-owning popup.
|
||||
const OVERLAY_SELECTOR =
|
||||
'[role="dialog"], [role="alertdialog"], [role="listbox"]:not([data-worktree-sidebar]), [role="menu"]'
|
||||
|
||||
type VisibleOverlayOptions = {
|
||||
/** Overlays inside a match are treated as page content, not as a layer above it. */
|
||||
|
||||
Reference in New Issue
Block a user