Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/keychain/src/components/NavigationHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ export function NavigationHeader({
// Check if we're in an iframe
const isInIframe = window.self !== window.top;

// Determine which button to show based on navigation state
// Determine which button to show based on navigation state.
// In iframe/popup context, prefer close over back by default.
const shouldShowBack =
forceShowBack || (canGoBack && !forceShowClose && !showClose);
forceShowBack ||
(!isInIframe && canGoBack && !forceShowClose && !showClose);
const shouldShowClose =
isInIframe && (forceShowClose || showClose || !shouldShowBack);

Expand Down
Loading