A reusable focus trap: Tab and Shift+Tab cycle within the container while isOpen() is true, and focus returns to whatever triggered the overlay when it closes. Every overlay and popover uses this one mechanism.
isOpen()
Call right before opening: remembers the trigger to restore focus to.
Call right after closing.
A reusable focus trap: Tab and Shift+Tab cycle within the container while
isOpen()is true, and focus returns to whatever triggered the overlay when it closes. Every overlay and popover uses this one mechanism.