Hands the keyboard to a modal panel that is on the page, and returns the
function that takes it back when the panel closes. The hook below is this,
bound to a component; it is exported for a caller that is not one.
Parameters
panel: HTMLElement
The panel. It needs tabIndex={-1} to hold the focus itself.
Hands the keyboard to a modal panel that is on the page, and returns the function that takes it back when the panel closes. The hook below is this, bound to a component; it is exported for a caller that is not one.