Polyfills the HTML popover attribute and showPopover/hidePopover/togglePopover methods onto HTMLElement, as well as the popovertarget and popovertargetaction attributes on <button> elements.
BSD 3-Clause "New" or "Revised" License
249
stars
14
forks
source link
`_a.focus is not a function` with `delegatesFocus: true`, but no focusable element #154
So my fix for #149 works as it's supposed to. The scenario I did not account for is when there is no focusable content in the web component. In that case focusDelegate still returns the ShadowRoot and then errors in the popoverFocusingSteps.
I think this is due to the TreeWalker code where isFocusable falls through all the if statements and then returns focusTarget.tabIndex !== -1 which is true for the ShadowRoot?
So my fix for #149 works as it's supposed to. The scenario I did not account for is when there is no focusable content in the web component. In that case
focusDelegate
still returns theShadowRoot
and then errors in thepopoverFocusingSteps
.I think this is due to the
TreeWalker
code whereisFocusable
falls through all the if statements and then returnsfocusTarget.tabIndex !== -1
which is true for theShadowRoot
?