Closed ChadKillingsworth closed 4 years ago
I think this may replace #136
I think this is totally orthogonal to #136, which is trying to make sure <dialog>
works when it's within a shadow root.
Turns out the safeBlur
function also needed a tweak to support shadowDom.
ping @samthor
When searching for a focusable item, we need to consider that the dialog may contain custom elements which have shadow roots. If we fail to find a focusable target by conventional means, look for custom elements (must have a '-' in the tag name) and search their shadow roots recursively.