Skip to content

Commit

Permalink
fix(fuselage): kebab menu click not working properly (#740)
Browse files Browse the repository at this point in the history
Co-authored-by: Tasso Evangelista <[email protected]>
  • Loading branch information
dougfabris and tassoevan authored Jun 10, 2022
1 parent a666f3c commit 8e5b4af
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/fuselage/src/components/Menu/Menu.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Placements } from '@rocket.chat/fuselage-hooks';
import type { ComponentProps, ElementType, ReactNode } from 'react';
import React, { useRef, useCallback } from 'react';
import React, { useRef, useCallback, useEffect } from 'react';

import { ActionButton, PositionAnimated, Options, useCursor } from '..';
import type Box from '../Box';
Expand Down Expand Up @@ -74,6 +74,12 @@ export const Menu = ({
[hide, reset, options]
);

useEffect(() => {
if (visible === 'hidden') {
ref.current?.classList.remove('focus-visible');
}
}, [visible]);

return (
<>
<ActionButton
Expand Down

0 comments on commit 8e5b4af

Please sign in to comment.