Skip to content

Commit 535e2c1

Browse files
[App Menu] Fix action button popover reposition (#272011)
## Summary This PR fixes a bug where for some reason, in classic mode (works fine in solution mode), the primary action item with a popover would have the popover rendered to the left instead of `downRight`. **Before:** <img width="347" height="161" alt="Screenshot 2026-05-30 at 01 17 20" src="https://github.com/user-attachments/assets/96787637-da8b-4dca-b53a-3144f1441f04" /> After: <img width="247" height="194" alt="Screenshot 2026-05-30 at 00 34 33" src="https://github.com/user-attachments/assets/3f9fc391-6fcc-4af8-81ff-c786ba3b0ccf" />
1 parent 438073e commit 535e2c1

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/core/packages/chrome/app-menu/core-chrome-app-menu-components/src/components/app_menu_action_button.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ export const AppMenuActionButton = (props: AppMenuActionButtonProps) => {
177177
popoverWidth={popoverWidth}
178178
popoverTestId={popoverTestId}
179179
anchorPosition="downRight"
180+
repositionToCrossAxis={false}
180181
onClose={onPopoverClose}
181182
onCloseOverflowButton={onCloseOverflowButton}
182183
/>
@@ -195,6 +196,7 @@ export const AppMenuActionButton = (props: AppMenuActionButtonProps) => {
195196
popoverWidth={popoverWidth}
196197
popoverTestId={popoverTestId}
197198
anchorPosition="downRight"
199+
repositionToCrossAxis={false}
198200
onClose={onPopoverClose}
199201
onCloseOverflowButton={onCloseOverflowButton}
200202
/>

src/core/packages/chrome/app-menu/core-chrome-app-menu-components/src/components/app_menu_popover.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ interface AppMenuContextMenuProps {
3030
switchConfig?: AppMenuSwitch;
3131
popoverTestId?: string;
3232
anchorPosition?: PopoverAnchorPosition;
33+
repositionToCrossAxis?: boolean;
3334
onClose: () => void;
3435
onCloseOverflowButton?: () => void;
3536
}
@@ -47,6 +48,7 @@ export const AppMenuPopover = ({
4748
switchConfig,
4849
popoverTestId = 'app-menu-popover',
4950
anchorPosition = 'downLeft',
51+
repositionToCrossAxis,
5052
onClose,
5153
onCloseOverflowButton,
5254
}: AppMenuContextMenuProps) => {
@@ -100,6 +102,7 @@ export const AppMenuPopover = ({
100102
hasArrow={false}
101103
anchorPosition={anchorPosition}
102104
aria-label={title || content}
105+
repositionToCrossAxis={repositionToCrossAxis}
103106
>
104107
<EuiContextMenu initialPanelId={0} panels={panels} css={{ minWidth: 180 }} />
105108
</EuiPopover>

0 commit comments

Comments
 (0)