diff --git a/packages/compass-components/src/components/actions/dropdown-menu-button.tsx b/packages/compass-components/src/components/actions/dropdown-menu-button.tsx index d9236df3c82..8369fa122d9 100644 --- a/packages/compass-components/src/components/actions/dropdown-menu-button.tsx +++ b/packages/compass-components/src/components/actions/dropdown-menu-button.tsx @@ -43,9 +43,8 @@ export function DropdownMenuButton({ 'data-testid': dataTestId, hideOnNarrow = true, }: DropdownMenuButtonProps) { - // this ref is used by the Menu component to calculate the height and position - // of the menu, and by us to give back the focus to the trigger when the menu - // is closed (https://jira.mongodb.org/browse/PD-1674). + // This ref is used by the Menu component to calculate the height and position + // of the menu. const menuTriggerRef = useRef(null); const [isMenuOpen, setIsMenuOpen] = useState(false); @@ -54,8 +53,6 @@ export function DropdownMenuButton({ evt.stopPropagation(); if (evt.currentTarget.dataset.menuitem) { setIsMenuOpen(false); - // Workaround for https://jira.mongodb.org/browse/PD-1674 - menuTriggerRef.current?.focus(); } const actionName = evt.currentTarget.dataset.action; if (typeof actionName !== 'string') { diff --git a/packages/compass-components/src/components/actions/item-action-menu.tsx b/packages/compass-components/src/components/actions/item-action-menu.tsx index 485ea92a560..dbfdaf4a373 100644 --- a/packages/compass-components/src/components/actions/item-action-menu.tsx +++ b/packages/compass-components/src/components/actions/item-action-menu.tsx @@ -62,9 +62,8 @@ export function ItemActionMenu({ iconSize = ItemActionButtonSize.Default, 'data-testid': dataTestId, }: ItemActionMenuProps) { - // this ref is used by the Menu component to calculate the height and position - // of the menu, and by us to give back the focus to the trigger when the menu - // is closed (https://jira.mongodb.org/browse/PD-1674). + // This ref is used by the Menu component to calculate the height and position + // of the menu. const menuTriggerRef = useRef(null); const [isMenuOpen, setIsMenuOpen] = useState(false); @@ -73,8 +72,6 @@ export function ItemActionMenu({ evt.stopPropagation(); if (evt.currentTarget.dataset.menuitem) { setIsMenuOpen(false); - // Workaround for https://jira.mongodb.org/browse/PD-1674 - menuTriggerRef.current?.focus(); } const actionName = evt.currentTarget.dataset.action; if (typeof actionName !== 'string') {