Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Remove extra changes from other PR
Browse files Browse the repository at this point in the history
The context around this change is in #7336 (comment)
  • Loading branch information
MadLittleMods committed Dec 14, 2021
1 parent c60bab7 commit e4cfa46
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/components/views/messages/MessageActionBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,8 @@ const OptionsButton: React.FC<IOptionsButtonProps> = ({
const [menuDisplayed, button, openMenu, closeMenu] = useContextMenu();
const [onFocus, isActive, ref] = useRovingTabIndex(button);
useEffect(() => {
// when the context menu is opened directly, e.g via mouse click, the onFocus handle is skipped so call manually
onFocus();
onFocusChange(menuDisplayed);
}, [onFocus, onFocusChange, menuDisplayed]);
}, [onFocusChange, menuDisplayed]);

let contextMenu: ReactElement | null;
if (menuDisplayed) {
Expand Down Expand Up @@ -120,10 +118,8 @@ const ReactButton: React.FC<IReactButtonProps> = ({ mxEvent, reactions, onFocusC
const [menuDisplayed, button, openMenu, closeMenu] = useContextMenu();
const [onFocus, isActive, ref] = useRovingTabIndex(button);
useEffect(() => {
// when the context menu is opened directly, e.g via mouse click, the onFocus handle is skipped so call manually
onFocus();
onFocusChange(menuDisplayed);
}, [onFocus, onFocusChange, menuDisplayed]);
}, [onFocusChange, menuDisplayed]);

let contextMenu;
if (menuDisplayed) {
Expand Down

0 comments on commit e4cfa46

Please sign in to comment.