|
@@ -58,9 +58,9 @@ type ResolvedSearchButtonProps = {
|
|
|
averageScore?: number | undefined;
|
|
averageScore?: number | undefined;
|
|
|
cluster: Cluster;
|
|
cluster: Cluster;
|
|
|
} & (
|
|
} & (
|
|
|
- | { name: string; icon: ReactNode }
|
|
|
|
|
- | { name?: undefined; icon?: undefined }
|
|
|
|
|
- ))[];
|
|
|
|
|
|
|
+ | { name: string; icon: ReactNode }
|
|
|
|
|
+ | { name?: undefined; icon?: undefined }
|
|
|
|
|
+ ))[];
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const ResolvedSearchButton = (props: ResolvedSearchButtonProps) => {
|
|
const ResolvedSearchButton = (props: ResolvedSearchButtonProps) => {
|
|
@@ -253,14 +253,14 @@ const SearchDialogContents = ({
|
|
|
// for determining if the user clicked their middle mouse button,
|
|
// for determining if the user clicked their middle mouse button,
|
|
|
// so we need to use the native onClick directly
|
|
// so we need to use the native onClick directly
|
|
|
middleMousePressedRef.current = e.button === 1;
|
|
middleMousePressedRef.current = e.button === 1;
|
|
|
- openTabModifierActiveRef.current = (browserInfo?.isMacOS && e.metaKey) ?? e.ctrlKey;
|
|
|
|
|
|
|
+ openTabModifierActiveRef.current = browserInfo?.isMacOS ? e.metaKey : e.ctrlKey;
|
|
|
}}
|
|
}}
|
|
|
onPointerUp={() => {
|
|
onPointerUp={() => {
|
|
|
const userWantsNewTab = middleMousePressedRef.current || openTabModifierActiveRef.current;
|
|
const userWantsNewTab = middleMousePressedRef.current || openTabModifierActiveRef.current;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// they want a new tab, the search popover stays open
|
|
// they want a new tab, the search popover stays open
|
|
|
if (!userWantsNewTab) closeDrawer();
|
|
if (!userWantsNewTab) closeDrawer();
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
middleMousePressedRef.current = false;
|
|
middleMousePressedRef.current = false;
|
|
|
openTabModifierActiveRef.current = false;
|
|
openTabModifierActiveRef.current = false;
|
|
|
}}
|
|
}}
|