fix: keep disposed Radio disclosures inert

This commit is contained in:
Sameh Khamis committed 2026-09-12 23:40:51 -07:00
1 parent 641a2c67e2
commit 53c510fe9f
3 files changed
+5 -1

No files matched your search

+2
View File
@@ -10,6 +10,7 @@ export function bindRadioControls() {
if (!this._radioPanel) return;
const tunerListenerOptions = {};
const setRadioDisclosure = (expanded, { returnFocus = false } = {}) => {
if (this.destroyed) return;
const open = Boolean(expanded);
this._contextRadioDock?.classList.toggle('disclosure-open', open);
if (this._contextRadioMini) this._contextRadioMini.hidden = !open;
@@ -23,6 +24,7 @@ export function bindRadioControls() {
expanded,
{ returnFocus = false } = {},
) => {
if (this.destroyed) return;
const displayOpen = kind === 'display' && Boolean(expanded);
const radioOpen = kind === 'radio' && Boolean(expanded);
if (displayOpen || radioOpen) this.actions.setSignalCollapsed(true);