Repository navigation
Conversation
Member
|
Before we review, please sign the CLA. You'll need to close and reopen the PR to rerun the check. |
snowystinger
left a comment
Member
There was a problem hiding this comment.
Need more info for reproduction #10891 (comment) so we can verify the changes.
Author
|
I added a reduced runnable reproduction, StackBlitz import link, exact interaction steps, and the recorded iOS viewport measurements in the issue reply. The standalone page is verified to build and open in desktop Chrome; its exact iOS Safari failure state still needs confirmation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10891
Intent
Keep an upward popover's choices visible above the iOS software keyboard when WebKit reports a
visualViewport.offsetTopthat disagrees with the layout viewport coordinates used for the trigger and boundary. In the reported case, the mismatch reduces the popover'smax-heightto zero.Change
getMaxHeightnow reads the visual viewport's top from the existinggetContainerDimensions(document.body, visualViewport)calculation. That calculation already usespageTopand the document scroll, and it has a separate WebKit pinch zoom path. Reading frombodyalso preserves documents that scroll onbodyrather thanhtml. The boundary and placement calculations remain otherwise unchanged.The regression tests use the recorded iOS geometry (
pageTop466,offsetTop310, document scroll 466, visual viewport height 404, trigger top 214). They exercise both the positioning calculation and the rendereduseOverlayPositionhook. A second calculation case covers body-only scrolling. All three cases fail against the previousoffsetTopcalculation and pass with this change.✅ Pull Request Checklist:
📝 Test Instructions:
yarn test packages/react-aria/test/overlays/calculatePosition.test.ts packages/react-aria/test/overlays/useOverlayPosition.test.tsx --runInBand.visualViewport.offsetTopis positive butpageTop - document scrollis zero.Automated verification
yarn lint— passed (format, types, oxlint, package lint and constraints).yarn test --maxWorkers=4 --silent— 384 suites passed, 8,176 tests passed, 16 skipped, 262 snapshots passed. Jest reported a worker teardown warning after completion.yarn test:ssr --silent— 60 suites and 74 tests passed.yarn vitest run --config=vitest.browser.config.ts --project chromium-desktop --project webkit-desktop --maxWorkers=1) — 37 files and 297 tests passed, 33 skipped.yarn test:browserrun failed with four TokenField timeouts, one WebKit ComboBox opening failure, and a Firefox session connection error. The failed TokenField files and WebKit ComboBox file passed when isolated; the complete Chromium and WebKit rerun above passed. Firefox still cannot connect even for a single overlay test, and a standalone Playwright Firefox launch hangs on this workstation. Firefox browser verification remains open.The original keyboard failure was observed on an iPhone 17 Simulator running iOS 26.5. The new upstream source has a deterministic hook regression test; it has not yet been retested on the Simulator.
🧢 Your Project:
Independent application using React Aria.