mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-21 16:55:25 +03:00
Only focus when menu item is clicked
This commit is contained in:
parent
c13e148b36
commit
0b3875c2cf
1 changed files with 4 additions and 2 deletions
|
@ -848,10 +848,12 @@ function Status({
|
|||
state={isContextMenuOpen ? 'open' : undefined}
|
||||
anchorPoint={contextMenuAnchorPoint}
|
||||
direction="right"
|
||||
onClose={() => {
|
||||
onClose={(e) => {
|
||||
setIsContextMenuOpen(false);
|
||||
// statusRef.current?.focus?.();
|
||||
statusRef.current?.closest('[tabindex]')?.focus?.();
|
||||
if (e?.reason === 'click') {
|
||||
statusRef.current?.closest('[tabindex]')?.focus?.();
|
||||
}
|
||||
}}
|
||||
portal={{
|
||||
target: document.body,
|
||||
|
|
Loading…
Reference in a new issue