Skip to content

v1.10.0

Choose a tag to compare

@windischb windischb released this 18 Apr 22:10
· 266 commits to develop since this release
b9971cc

Summary

Before this release, CoarSubFlyout, CoarContextMenu, CoarSelect / CoarMultiSelect
/ CoarTagSelect, and CoarSidebarGroup (in mode="flyout") each teleported their own
panel with a hardcoded z-index: var(--coar-z-overlay) = 1000. Inside a CoarDialog at
z-index: 1002, those panels rendered behind the dialog and clicks on them were
interpreted as outside-the-dialog — so the dialog closed mid-interaction. They also
maintained their own document-level click-outside and escape listeners, which fought
each other when nested.

After 1.10.0, every one of them opens via overlay.open({ parent: useOverlayParent() }).
The service:

  • stacks each overlay above its ancestor (z-index = 1000 + instance.id * 2)
  • treats clicks inside a child overlay as clicks inside the parent tree (so a dialog
    doesn't close when you interact with a popover it rendered)
  • handles Escape and outside-click centrally, so nested overlays can't steal each other's
    events
  • removes a transform: translate3d(...) trap on select dropdowns that was breaking
    position: fixed descendants

Highlights for release notes

Fixed

  1. Stacking + dismissal for overlay widgets inside dialogs.
    CoarSubFlyout, CoarContextMenu, CoarSelect / CoarMultiSelect / CoarTagSelect,
    and CoarSidebarGroup flyouts now render above their ancestor dialog and do not close
    the dialog when interacted with. All public APIs are unchanged — consumers get the fix
    for free.

  2. Silent parent-linking bug in the overlay-service.
    useOverlayParent() returned an OverlayInstance, but OverlayOpenOptions.parent
    was typed OverlayRef and the internal lookup read __instanceId only. Every
    open({ parent }) call from a descendant silently dropped the link. Before the fix,
    clicks outside a popover inside a dialog relied on hover-out timers and left the
    popover lingering; after the fix, one outside click cascades through the whole branch
    in a single pass.

  3. Select dropdown transform: translate3d() containing-block trap.
    The legacy dropdown positioned itself with a transform, creating a containing block
    for every position: fixed descendant. Floating widgets rendered from inside a
    dropdown (Monaco IntelliSense, portal-style popups) landed at the dropdown offset
    instead of the viewport. The service's host uses plain top/left, so the trap is
    no longer reachable via a select.

  4. Select dropdown scroll behavior.
    selectPreset.scroll.strategy changed from 'close' to 'reposition'. Dropdowns now
    follow the trigger on scroll instead of closing abruptly — matches the pre-migration
    (useSelectDropdown) behavior.

Changed (backwards-compatible)

  • OverlayOpenOptions.parent accepts OverlayRef | OverlayInstance (was just
    OverlayRef). Existing callers that passed an OverlayRef keep working; descendants
    using useOverlayParent() can now pass the returned instance through without casting.
  • selectPreset.a11y dropped. The select panels already render an inner
    role="listbox" with the id the trigger's aria-controls references. A duplicate
    role on the outlet host duplicated the semantic element and misplaced
    aria-multiselectable. No impact on consumers — the panels are the correct semantic
    anchor.