Skip to content
TypeScript

fix(web): keep ref picker steady when opening (#9472)

Adamulek123d67157a09c28
diff --git a/apps/web/src/components/BranchToolbarBranchSelector.tsx b/apps/web/src/components/BranchToolbarBranchSelector.tsx
index 94697b9592f..0dad406985a 100644
--- a/apps/web/src/components/BranchToolbarBranchSelector.tsx
+++ b/apps/web/src/components/BranchToolbarBranchSelector.tsx
@@ -774,7 +774,9 @@ export function BranchToolbarBranchSelector({
>
<ComboboxTrigger
render={<Button variant="ghost" size="xs" />}
- className="min-w-0 max-w-full font-normal text-muted-foreground/70 text-xs! hover:text-foreground/80"
+ // No press-scale: the popup aligns live to this trigger, so a
+ // momentary 0.97 shrink would drag the open popup ~3px sideways.
+ className="min-w-0 max-w-full font-normal text-muted-foreground/70 text-xs! hover:text-foreground/80 active:scale-100"
disabled={isInitialBranchesLoadPending || isBranchActionPending}
>
<GitBranchIcon className="size-3 shrink-0 opacity-70" />
diff --git a/apps/web/src/components/ui/combobox.tsx b/apps/web/src/components/ui/combobox.tsx
index 59bf4d63770..6437f1fc872 100644
--- a/apps/web/src/components/ui/combobox.tsx
+++ b/apps/web/src/components/ui/combobox.tsx
@@ -175,8 +175,8 @@ function ComboboxPopup({
side?: ComboboxPrimitive.Positioner.Props["side"];
anchor?: ComboboxPrimitive.Positioner.Props["anchor"];
}) {
- const { chipsRef } = React.use(ComboboxContext);
- const anchor = anchorProp ?? chipsRef;
+ const { chipsRef, multiple } = React.use(ComboboxContext);
+ const anchor = anchorProp ?? (multiple ? chipsRef : undefined);
return (
<ComboboxPrimitive.Portal>