Skip to content

[combobox][select] Fix hovered item stealing highlight when the list scrolls in Safari - #5265

Merged
atomiks merged 4 commits into
mui:masterfrom
arikchakma:fix/list-navigation-safari-stationary-mousemove
Jul 23, 2026
Merged

atomiks merged 4 commits into
mui:masterfrom
arikchakma:fix/list-navigation-safari-stationary-mousemove

Conversation

@arikchakma

Copy link
Copy Markdown
Contributor

Fixes #4002

In Safari, when keyboard navigation scrolls the list, WebKit fires a mousemove on whatever item ends up under the cursor, even though the mouse never moved. useListNavigation takes that as a real hover and moves the highlight there, so the keyboard highlight keeps snapping back to wherever the mouse was. Chrome and Firefox don't fire these events.

The fix ignores 0 delta mousemove/pointermove events when running in WebKit. Select, Combobox, and Menu all share this hook, so all three are covered.

@pkg-pr-new

pkg-pr-new Bot commented Jul 18, 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@5265
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@5265
    

commit: 01e0e93

@code-infra-dashboard

code-infra-dashboard Bot commented Jul 18, 2026 •

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 🔺+66B(+0.01%) 🔺+49B(+0.03%)

Details of bundle changes

Performance

Total duration: 1,365.59 ms +0.19 ms(0.0%) | Renders: 78 (+0) | Paint: 2,141.52 ms +26.94 ms(+1.3%)

Test Duration Renders
Select mount (200 instances) 194.06 ms 🔺+38.53 ms(+24.8%) 3 (+0)
Combobox open — 500 items 53.24 ms 🔺+13.21 ms(+33.0%) 4 (+0)
Combobox type — 500 items, all stay mounted (type "Row ") 40.63 ms 🔺+9.63 ms(+31.1%) 11 (+0)

12 tests within noise — details

Metric alarms

Test Metric Change
Select mount (200 instances) bench:paint 🔺 +51.39 ms
Combobox open — 500 items bench:paint#combobox-open 🔺 +27.89 ms
Combobox open — 500 items bench:paint 🔺 +27.89 ms
Combobox type — 500 items, all stay mounted (type "Row ") bench:paint#combobox-open 🔺 +23.97 ms
Combobox type — 500 items, all stay mounted (type "Row ") bench:paint 🔺 +23.97 ms

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

@netlify

netlify Bot commented Jul 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 01e0e93
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a616866555b3b00085e0c7c
😎 Deploy Preview https://deploy-preview-5265--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.

@zannager zannager added component: select Changes related to the select component. component: combobox Changes related to the combobox component. labels Jul 20, 2026
@atomiks
atomiks merged commit 9a5c385 into mui:master Jul 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: combobox Changes related to the combobox component. component: select Changes related to the select component.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[combobox][select] Hovered item gets highlighted when scroll changes in Safari

3 participants