Skip to content

[popups] Fix hover and focus interaction issues - #5037

Merged
atomiks merged 1 commit into
mui:masterfrom
atomiks:fix/hover-focus-positioning-bugs
Aug 7, 2026
Merged

atomiks merged 1 commit into
mui:masterfrom
atomiks:fix/hover-focus-positioning-bugs

Conversation

@atomiks

@atomiks atomiks commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes two timing issues in the shared focus and hover interaction hooks.

Changes

  • useFocus records the focused reference when the window loses focus while its popup is closed. This prevents browser-restored focus from opening the popup after returning to the tab, such as when switching tabs before a focus delay finishes.
  • useHoverReferenceInteraction reads the current handleClose options during render instead of using the previous layout-committed value. This keeps safe-polygon pointer-event and scope options in sync with the current render.

Tests

  • Covers restored focus after leaving the tab during a focus delay.
  • Covers handleClose options changing between renders.

@atomiks atomiks changed the title [floating-ui-react] Fix hover, focus, and anchor positioning bugs [popups] Fix hover, focus, and anchor positioning bugs Jun 12, 2026
@atomiks atomiks added type: bug It doesn't behave as expected. component: tooltip Changes related to the tooltip component. component: preview card Changes related to the preview card component. labels Jun 12, 2026
@code-infra-dashboard

code-infra-dashboard Bot commented Jun 12, 2026 •

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 🔺+4B(0.00%) 🔺+3B(0.00%)

Details of bundle changes

Performance

Total duration: 1,025.82 ms -6.58 ms(-0.6%) | Renders: 78 (+0) | Paint: 1,596.52 ms +11.99 ms(+0.8%)

No significant changes — details


Check out the code infra dashboard for more information about this PR.

@netlify

netlify Bot commented Jun 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit db74d28
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a7529fb515ac5000805cde9
😎 Deploy Preview https://deploy-preview-5037--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@atomiks atomiks changed the title [popups] Fix hover, focus, and anchor positioning bugs [popups] Fix assorted hover, focus and positioning issues Jun 23, 2026
@atomiks atomiks added scope: all components Widespread work has an impact on almost all components. and removed component: tooltip Changes related to the tooltip component. component: preview card Changes related to the preview card component. labels Jun 23, 2026
@atomiks
atomiks force-pushed the fix/hover-focus-positioning-bugs branch from 4634103 to 0aa50fe Compare June 23, 2026 07:26
@atomiks atomiks changed the title [popups] Fix assorted hover, focus and positioning issues [popups] Fix hover and focus interaction issues Jun 23, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
  • base-ui-tanstack-start

  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/react@5037
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@5037
    

commit: db74d28

@atomiks
atomiks force-pushed the fix/hover-focus-positioning-bugs branch 3 times, most recently from 6ab22ef to 86d0912 Compare June 23, 2026 08:37
@atomiks
atomiks force-pushed the fix/hover-focus-positioning-bugs branch from 86d0912 to db74d28 Compare August 7, 2026 00:42
@atomiks
atomiks marked this pull request as ready for review August 7, 2026 00:43
@atomiks
atomiks merged commit 98144c7 into mui:master Aug 7, 2026
6 checks passed
@atomiks
atomiks deleted the fix/hover-focus-positioning-bugs branch August 11, 2026 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: all components Widespread work has an impact on almost all components. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant