details-dialog-element icon indicating copy to clipboard operation
details-dialog-element copied to clipboard

Trap focus when connected in `<details open>`

Open seanpdoyle opened this issue 2 years ago • 0 comments

When the <details-dialog> element is connected to the document as a child of a <details> element rendered with [open], trap focus immediately.

In support of this change, extract the trapFocus and releaseFocus functions, then call trapFocus within the connectedCallback if the ancestor detail is [open].

seanpdoyle avatar Aug 09 '22 19:08 seanpdoyle