fix(web): keep ref picker steady when opening (#9472)
This commit is contained in:
1 parent
ea2983afbb
commit
d67157a09c
2 files changed
+5
-3
No files matched your search
@@ -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" />
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user