When an is removed from the DOM while its popover is open (common in SPA frameworks that mount/unmount components),
disconnectedCallback calls cleanup() which removes scroll/resize listeners but does not hide the popover or reset aria-expanded on
the trigger.
This leaves a stale popover visible on screen with no way to dismiss it.
Steps to reproduce:
- Open a dropdown
- Remove the element from the DOM (e.g. el.remove())
- The popover menu remains visible
Expected: Popover is hidden and ARIA state is reset on removal.
dropdown.js:70-73
When an is removed from the DOM while its popover is open (common in SPA frameworks that mount/unmount components),
disconnectedCallback calls cleanup() which removes scroll/resize listeners but does not hide the popover or reset aria-expanded on
the trigger.
This leaves a stale popover visible on screen with no way to dismiss it.
Steps to reproduce:
Expected: Popover is hidden and ARIA state is reset on removal.
dropdown.js:70-73