Skip to content

Conversation

@atomiks
Copy link
Contributor

@atomiks atomiks commented Jan 25, 2026

This change was added as part of #3654, but it's not necessary following the changes in FloatingFocusManager in later commits of the PR.

This fixes the popup closing (input outside popup pattern) when swiping onto an option

@atomiks atomiks added type: regression A bug, but worse, it used to behave as expected. component: autocomplete Changes related to the autocomplete component. component: combobox Changes related to the combobox component. labels Jan 25, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 25, 2026

commit: 15c91b3

@mui-bot
Copy link

mui-bot commented Jan 25, 2026

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react ▼-21B(-0.01%) ▼-1B(0.00%)

Details of bundle changes


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

@netlify
Copy link

netlify bot commented Jan 25, 2026

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit d3132bb
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/69791c920a6824000891b70d
😎 Deploy Preview https://deploy-preview-3859--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 force-pushed the fix/combobox-ios-voiceover branch from c495211 to 1b7ac49 Compare January 25, 2026 22:19
@atomiks atomiks marked this pull request as ready for review January 26, 2026 09:03
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 26, 2026

Greptile Overview

Greptile Summary

Removes an unnecessary complexity introduced in PR #3654 by reverting to a simpler modal={!inputInsidePopup} logic instead of the conditional modal={inputInsidePopup ? modal : false}.

  • Removes unused modal selector from store (line 50)
  • Simplifies FloatingFocusManager modal prop to !inputInsidePopup (line 117)
  • The change is a cleanup that became possible after FloatingFocusManager improvements in the same PR [menu][popover][combobox] Fix focus guard handling #3654
  • Fixes iOS VoiceOver issue where popup would incorrectly close when swiping onto an option

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change removes unused code and simplifies logic following improvements made to FloatingFocusManager in the same PR [menu][popover][combobox] Fix focus guard handling #3654. It's a straightforward cleanup that removes a selector that's no longer needed and simplifies the modal prop from a conditional expression to a simple negation. The change fixes a real iOS VoiceOver accessibility issue.
  • No files require special attention

Important Files Changed

Filename Overview
packages/react/src/combobox/popup/ComboboxPopup.tsx Removed unused modal selector and simplified modal prop logic from conditional to !inputInsidePopup

Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

This seems to regress the Popover closing when navigating forward with Tab on Firefox.
Like on the previous PR, with this change it closes Popovers only when doing backwards navigation (Shift + Tab).
Is it possible to fix both? 🤔

Besides, given that this has regressed, do you think it's possible to write a test cover this behavior?

@atomiks
Copy link
Contributor Author

atomiks commented Jan 26, 2026

This seems to regress the Popover closing when navigating forward with Tab on Firefox.

That's not really possible because it's not touching anything to do with Popover. I tested and it's sometimes broken but is flaky. After refreshing several times it doesn't happen anymore.

I think that's the flake issue with React's hydration useId() error I mentioned in that PR, which breaks the focus guards. Because the race condition affects a bunch of other React behaviors -- React has released a fix for it in latest canaries.

You can confirm by looking in the console on the popup-tabbing experiment on localhost:

Screenshot 2026-01-26 at 11 16 56 pm

The focus guards are only broken when that error appears in the console, but you can't see it in the deploy preview.

Besides, given that this has regressed, do you think it's possible to write a test cover this behavior?

It's pretty tightly related to real screen reader operation with how it skips over aria-hidden and applies focus and isn't really testable with automation. We need to make sure changes to focus guards manually test iOS VoiceOver each time

Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

Thanks for checking.
Indeed, I can confirm that if the console doesn't log the error, navigation works as expected on Firefox as well. 👌

As for the test - if we can't think of a way to test it outside of iOS, then I don't any more nitpicks.
Great work.

@atomiks atomiks merged commit a874141 into mui:master Jan 27, 2026
20 of 22 checks passed
@atomiks atomiks deleted the fix/combobox-ios-voiceover branch January 27, 2026 20:19
atomiks added a commit to atomiks/base-ui that referenced this pull request Jan 28, 2026
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: regression A bug, but worse, it used to behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants