Repository navigation
[navigation menu] Fix delayed trigger switches in Safari - #4310
Conversation
commit: |
Codex ReviewOverviewThis patch narrows the Navigation Menu hover workaround to WebKit so Safari avoids the delayed trigger switch, while nested menus keep the existing scoped pointer-events behavior. It also keeps the trigger-switch size shortcut and adds WebKit-specific regression coverage for both top-level and nested menus. FindingsNo blocking issues found in this patch. 1. ℹ️ [Informational] Chromium timing stayed effectively flatImpact: The change looks targeted to Safari/WebKit responsiveness rather than broad browser throughput, and the focused Chromium check did not show a wider performance regression. Evidence:
Recommendation: None required. Keep a quick Safari manual check in normal release validation, because the user-facing win here is browser-specific and not expected to show up in Chromium timings. Confidence: 4/5High confidence based on a full-branch diff review, focused JSDOM and Chromium test runs, and a latest- Notes
|
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Bundle size report
Check out the code infra dashboard for more information about this PR. |
d6b1c68 to
cbb4e01
Compare
Summary
This improves Navigation Menu hover performance during trigger-to-trigger switching.
What changed
safePolygonpointer-events blocking enabled for non-WebKit browsers.document.body.Why
Safari could intermittently delay hover activation when moving directly between top-level triggers. Entering the popup first consistently cleared the issue, which pointed to the top-level pointer-events mutation path rather than
safePolygongeometry. Disabling that mutation on WebKit fixes the delay while preserving the better non-WebKit behavior.