Skip to content

[all components] Reset openMethod on close transition - #4128

Merged
atomiks merged 1 commit into
mui:masterfrom
atomiks:codex/open-method-usevaluechanged-reset
Mar 4, 2026
Merged

atomiks merged 1 commit into
mui:masterfrom
atomiks:codex/open-method-usevaluechanged-reset

Conversation

@atomiks

@atomiks atomiks commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Fixes a race condition due to useClick's mousedown being deferred in a rAF and the reset happening on close complete. Concrete bug: tapping the Select trigger quickly repeatedly sometimes had a null openMethod incorrectly.

@atomiks atomiks added type: bug It doesn't behave as expected. scope: all components Widespread work has an impact on almost all components. labels Feb 18, 2026
@pkg-pr-new

pkg-pr-new Bot commented Feb 18, 2026 •

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

  • vite-css-base-ui-example

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

commit: afb402e

@mui-bot

mui-bot commented Feb 18, 2026 •

Copy link
Copy Markdown

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react ▼-130B(-0.03%) ▼-108B(-0.07%)

Details of bundle changes


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

@netlify

netlify Bot commented Feb 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 6682e3a
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/69a7a74298520000085ebfed
😎 Deploy Preview https://deploy-preview-4128--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 February 18, 2026 04:39
@atomiks

atomiks commented Mar 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Codex Review

Overview

This PR centralizes openMethod reset behavior inside useOpenInteractionType (on open: true -> false) and removes per-component/manual reset calls across popup roots. It also adds a targeted Select.Root regression test for the rapid touch close/reopen race caused by deferred mousedown handling.

Findings (None)

No blocking issues found in this patch.

Confidence: 4/5

High confidence after a full master...head pass across all changed files, including the new regression test that exercises the race window this PR targets.

Notes

  • Latest delta since prior review: added SelectRoot interaction-type regression coverage (keeps touch interaction type when reopening quickly after close).
  • Full-branch conclusion remains that the behavioral change is coherent and now has focused test coverage for the reported race condition.

@atomiks
atomiks force-pushed the codex/open-method-usevaluechanged-reset branch from dad560a to 6456b70 Compare March 3, 2026 23:19
@atomiks
atomiks force-pushed the codex/open-method-usevaluechanged-reset branch from e6c7253 to 6682e3a Compare March 4, 2026 03:30
@atomiks
atomiks merged commit de9eef6 into mui:master Mar 4, 2026
6 checks passed
@atomiks
atomiks deleted the codex/open-method-usevaluechanged-reset branch August 11, 2026 03:02
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.

2 participants