Skip to content

fix(input-group): ignore portaled descendant events - #833

Open
songkeys wants to merge 1 commit into
cosscom:mainfrom
songkeys:fix/input-group-portal-events
Open

fix(input-group): ignore portaled descendant events#833
songkeys wants to merge 1 commit into
cosscom:mainfrom
songkeys:fix/input-group-portal-events

Conversation

@songkeys

@songkeys songkeys commented Aug 13, 2026

Copy link
Copy Markdown

Summary

  • Ignore mouse events from portaled descendants before applying the InputGroupAddon focus behavior.
  • Preserve focus behavior for physical non-interactive addon content and interactive descendants.
  • Add regression coverage for physical, interactive, and portaled event targets.

Why

React events from portals bubble through the React component tree even when the event target is not physically contained by the ancestor DOM element. Non-interactive content in a portaled Popover, Select, or Menu can therefore reach InputGroupAddon, call preventDefault, and focus the grouped input.

Checking physical containment before the existing interactive-element check keeps the focus convenience scoped to the addon DOM subtree.

React documents the portal event behavior here: https://react.dev/reference/react-dom/createPortal#caveats

Testing

  • bun test
  • bun run lint in apps/ui and packages/ui
  • bun run typecheck in apps/ui and packages/ui
  • bun run registry:validate-deps
  • bun run registry:build
  • bun run ui:sync

Copilot AI lite review requested due to automatic review settings August 13, 2026 04:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
coss-com-origin Skipped Skipped Aug 13, 2026 4:39am

Request Review

@vercel
vercel Bot temporarily deployed to Preview – coss-com-origin August 13, 2026 04:39 Inactive
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

@songkeys is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

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.

2 participants