Skip to content

fix: use portal in secret path input popover to fix safari placement#5777

Merged
scott-ray-wilson merged 1 commit intomainfrom
secret-path-input-portal
Mar 20, 2026
Merged

fix: use portal in secret path input popover to fix safari placement#5777
scott-ray-wilson merged 1 commit intomainfrom
secret-path-input-portal

Conversation

@scott-ray-wilson
Copy link
Copy Markdown
Contributor

Context

This PR adds a portal to the secret path input popover to fix safari element positioning

Screenshots

CleanShot 2026-03-20 at 14 11 06@2x

Steps to verify the change

  • test in safari to make sure behavior is corrected
  • test in chrome to ensure no regressions

Type

  • Fix
  • Feature
  • Improvement
  • Breaking
  • Docs
  • Chore

Checklist

  • Title follows the conventional commit format: type(scope): short description (scope is optional, e.g., fix: prevent crash on sync or fix(api): handle null response).
  • Tested locally
  • Updated docs (if needed)
  • Updated CLAUDE.md files (if needed)
  • Read the contributing guide

@maidul98
Copy link
Copy Markdown
Collaborator

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 20, 2026

Greptile Summary

This PR wraps Popover.Content inside a Popover.Portal in SecretPathInput to fix a Safari-specific bug where the popover was incorrectly positioned due to CSS stacking/overflow constraints on ancestor elements. Rendering into a portal appends the popover to document.body, bypassing those constraints. A secondary improvement changes overflow-y-scroll to overflow-y-auto so the scrollbar only appears when content actually overflows.

  • The portal wrapping is the correct Radix UI pattern for fixing browser-specific positioning issues.
  • Changing overflow-y-scrolloverflow-y-auto avoids an always-visible scrollbar track when there are few suggestions.
  • The pre-existing relative top-2 class on Popover.Content is effectively a no-op since Radix UI overrides positioning via inline styles, but this is unchanged from before and has no functional impact.
  • No security, logic, or API-breaking issues were identified.

Confidence Score: 5/5

  • This PR is safe to merge — it is a minimal, well-scoped frontend-only fix with no security, logic, or breaking change concerns.
  • The change is confined to a single UI component, uses a well-established Radix UI pattern (portal rendering) to address a known cross-browser positioning issue, and introduces no new logic or risk surface.
  • No files require special attention.

Important Files Changed

Filename Overview
frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx Wraps Popover.Content in Popover.Portal to fix Safari element positioning; also changes overflow-y-scroll to overflow-y-auto as a minor improvement.

Last reviewed commit: "fix: use portal in s..."

@victorvhs017 victorvhs017 self-requested a review March 20, 2026 21:32
Copy link
Copy Markdown
Contributor

@victorvhs017 victorvhs017 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@scott-ray-wilson scott-ray-wilson merged commit 5904c13 into main Mar 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants