Skip to content

[combobox] Prevent item taps from blurring input - #4578

Merged
atomiks merged 1 commit into
mui:masterfrom
atomiks:codex/combobox-ios-item-blur
Apr 10, 2026
Merged

atomiks merged 1 commit into
mui:masterfrom
atomiks:codex/combobox-ios-item-blur

Conversation

@atomiks

@atomiks atomiks commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor

Tapping a combobox item on iOS (seems new in 26.4+) could still blur the input because the item only cancelled the pointerdown path. Safari can still deliver a synthetic mousedown for touch taps, which left a fallback path that could steal focus.

This keeps the existing pointerdown guard and also cancels mousedown on the shared item implementation, so the input stays focused while selection is committed. The shared change also covers Autocomplete.Item.

Changes

  • Prevent default on mousedown in Combobox.Item in addition to the existing pointerdown handling.
  • Add regression coverage for touch selection focus retention and the mousedown fallback path.

@atomiks atomiks added type: bug It doesn't behave as expected. component: combobox Changes related to the combobox component. component: autocomplete Changes related to the autocomplete component. labels Apr 10, 2026 — with ChatGPT Codex Connector
@pkg-pr-new

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

commit: 669b5b1

@code-infra-dashboard

code-infra-dashboard Bot commented Apr 10, 2026 •

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-4578--base-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 🔺+35B(+0.01%) ▼-2B(0.00%)

Details of bundle changes


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

@netlify

netlify Bot commented Apr 10, 2026

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 669b5b1
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/69d8c9f581b3ca0008456f0c
😎 Deploy Preview https://deploy-preview-4578--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@atomiks
atomiks marked this pull request as ready for review April 10, 2026 10:04

@mnajdova mnajdova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👌 works as expected

@atomiks
atomiks merged commit 6225a29 into mui:master Apr 10, 2026
8 of 9 checks passed
@atomiks
atomiks deleted the codex/combobox-ios-item-blur branch April 10, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: autocomplete Changes related to the autocomplete component. component: combobox Changes related to the combobox component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants