Skip to content

fix(cascadeselect): keep the panel open when an option in a nested overlay is picked - #734

Open
tokainz wants to merge 1 commit into
openvi-foundation:masterfrom
tokainz:fix/cascadeselect-nested-overlay-click
Open

tokainz wants to merge 1 commit into
openvi-foundation:masterfrom
tokainz:fix/cascadeselect-nested-overlay-click

Conversation

@tokainz

@tokainz tokainz commented Nov 19, 2026

Copy link
Copy Markdown

What does this PR do?

A Select in the header or footer slot of a CascadeSelect closed the CascadeSelect when you picked one of its options. The Select panel is attached to body, so the CascadeSelect outside click listener treated the click as an outside click.

This applies the same fix as in DatePicker (#710), MultiSelect (#718), AutoComplete (#721) and Select (#732):

  • The CascadeSelect listens to overlay-click while its panel is open. If the event comes from a component inside its panel, it sets selfClick and ignores the following outside click. Select emits overlay-click on mousedown, so this also works when the Select has already closed by the time the click event arrives.
  • isNestedOverlayVisible() checks for an open overlay inside the panel. While the nested Select is open, a click outside closes only the Select. A second click closes the CascadeSelect.

The listener is removed in onOverlayLeave and beforeUnmount.

Unlike the other components, CascadeSelect sets aria-expanded on its own option groups (role="treeitem"). isNestedOverlayVisible() skips those ([aria-expanded="true"]:not([role="treeitem"])), so an outside click still closes the panel while a group is expanded.

Related issue

Closes #733

Checklist

  • Tests added or updated for the change
  • pnpm run lint and pnpm run format pass
  • Changelog entry added under ## [Unreleased] in CHANGELOG.md

@vercel

vercel Bot commented Nov 19, 2026

Copy link
Copy Markdown

@tokainz is attempting to deploy a commit to the njevric's projects Team on Vercel.

A member of the Team first needs to authorize it.

@tokainz
tokainz force-pushed the fix/cascadeselect-nested-overlay-click branch from f9fa29f to 5c0e4a1 Compare November 20, 2026 21:07

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: CascadeSelect closes when you pick an option in a Select placed in its header or footer

1 participant