Skip to content

Popover component does not reposition on scroll or window resize#351

Open
quangtuanitmo18 wants to merge 5 commits intomainfrom
fix/codexui
Open

Popover component does not reposition on scroll or window resize#351
quangtuanitmo18 wants to merge 5 commits intomainfrom
fix/codexui

Conversation

@quangtuanitmo18
Copy link
Copy Markdown
Contributor

Related to #350

@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codex-ui Ready Ready Preview, Comment May 6, 2026 11:44am

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes Popover detaching from its target by keeping its computed position in sync while the page (or scrollable containers) scrolls and while the window resizes, and corrects horizontal positioning for horizontally scrolled pages (Issue #350).

Changes:

  • Recalculate popover position on scroll/resize using throttled event handlers.
  • Persist last align / width configuration so repositioning can re-run move() consistently.
  • Fix horizontal offset by including window.scrollX in left/right alignment calculations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread @codexteam/ui/src/vue/components/popover/usePopover.ts
Comment thread @codexteam/ui/src/vue/components/popover/usePopover.ts
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread @codexteam/ui/src/vue/components/popover/usePopover.ts
Comment thread @codexteam/ui/src/vue/components/popover/usePopover.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants