fix: KeyboardExtender width on iPad in split mode
#1113
Merged
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.
📜 Description
Use
windowsize instead ofscreen.💡 Motivation and Context
Originally I added code in #948 (used subscription on
screeninstead ofwindow). In #957 I realized that new approach has downsides and started to uselayoutSubviewsmethod instead of subscription to events that apple provides (and I kept usingscreensize as main source of truth). However on iPad in multi-task/stage-manager mode screen size may not reflect a real window size (because if window is floating it can be much smaller than the screen).So in this PR I'm refining solutions made in #948 and #957. We still need to use
windowas main source of truth and we need to read it inlayoutSubviewsbecause new dimensions may not be available in events that we receive from notification center.I tested repo provided in #948 and #957 and with new code they still seem to work well:
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-09-08.at.17.24.03.mp4
Simulator.Screen.Recording.-.iPad.Pro.11-inch.M4.16GB.-.2025-09-08.at.17.27.25.mp4
Closes #1045
📢 Changelog
JS
windowdimensions instead ofscreen;iOS
self.windowinstead ofUIScreen.main;🤔 How Has This Been Tested?
Tested manually on iPad 11 Pro (m4, 16GB, iOS 18.5).
📸 Screenshots (if appropriate):
📝 Checklist