Skip to content

Commit 57707a0

Browse files
committed
chore(insights hub): correct the logic for determining which key to use to check for new tab behavior
1 parent df15442 commit 57707a0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

apps/insights/src/components/Root/search-button.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ type ResolvedSearchButtonProps = {
5858
averageScore?: number | undefined;
5959
cluster: Cluster;
6060
} & (
61-
| { name: string; icon: ReactNode }
62-
| { name?: undefined; icon?: undefined }
63-
))[];
61+
| { name: string; icon: ReactNode }
62+
| { name?: undefined; icon?: undefined }
63+
))[];
6464
};
6565

6666
const ResolvedSearchButton = (props: ResolvedSearchButtonProps) => {
@@ -253,14 +253,14 @@ const SearchDialogContents = ({
253253
// for determining if the user clicked their middle mouse button,
254254
// so we need to use the native onClick directly
255255
middleMousePressedRef.current = e.button === 1;
256-
openTabModifierActiveRef.current = (browserInfo?.isMacOS && e.metaKey) ?? e.ctrlKey;
256+
openTabModifierActiveRef.current = browserInfo?.isMacOS ? e.metaKey : e.ctrlKey;
257257
}}
258258
onPointerUp={() => {
259259
const userWantsNewTab = middleMousePressedRef.current || openTabModifierActiveRef.current;
260-
260+
261261
// they want a new tab, the search popover stays open
262262
if (!userWantsNewTab) closeDrawer();
263-
263+
264264
middleMousePressedRef.current = false;
265265
openTabModifierActiveRef.current = false;
266266
}}

0 commit comments

Comments
 (0)