feat: add arrow key navigation to file context menu & options panel
feat: close popover with Escape key and focus anchor element fix: menu focus fix: quick settings menu keyboard navigation
This commit is contained in:
@@ -87,6 +87,15 @@ const PositionedPopoverContent = ({
|
||||
}}
|
||||
ref={setPopoverElement}
|
||||
data-popover={id}
|
||||
onKeyDown={(event) => {
|
||||
if (event.key === 'Escape') {
|
||||
event.stopPropagation()
|
||||
togglePopover()
|
||||
if (anchorElement) {
|
||||
anchorElement.focus()
|
||||
}
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div className={classNames(disableMobileFullscreenTakeover && 'hidden', 'md:hidden')}>
|
||||
<div className="flex items-center justify-end px-3 pt-2">
|
||||
|
||||
Reference in New Issue
Block a user