Dimensions doesn't work as expected on initially entering split-view (iPad)
See original GitHub issueDescription
It seems that when you initially enter split-view on an iPad, Dimensions
does not update as expected. Specifically, the “change” event does not fire and Dimensions.get('window').width
does not return the updated width.
After resizing the views, Dimensions
goes back to updating as expected.
React Native version:
(Note that the same behavior is observed on the latest version of React Native.)
React Native Environment Info:
System:
OS: macOS 10.15.2
CPU: x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 21.93 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.20.1 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6308749
Xcode: /undefined - /usr/bin/xcodebuild
npmPackages:
@sentry/react-native: ^1.1.0 => 1.1.0
react: 16.8.3 => 16.8.3
react-native: 0.59.10 => 0.59.10
npmGlobalPackages:
react-native-cli: 2.0.1
Steps To Reproduce
- Open the app on an iPad.
- See that
Dimensions.get('window').width
returns the expected width. - Enter split-view.
- See that the the dimensions change event isn’t fired and that
Dimensions.get('window').width
returns the old width. - Resize the app. See that the dimensions change event fires as expected and that
Dimensions.get('window').width
returns the expected width.
Expected Results
- Open the app on an iPad.
- See that
Dimensions.get('window').width
returns the expected width. - Enter split-view.
- See that the the dimensions change event is fired and that
Dimensions.get('window').width
returns the new width. - Resize the app. See that the dimensions change event fires as expected and that
Dimensions.get('window').width
returns the expected width.
Snack and Screen Recording
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Slide Over & Split Screen Not Working - Apple Developer
Multi touch gestures and Safari split screen work, but the system does not respond to the slide over gesture. I have rebooted and...
Read more >How to Use Split View Multitasking on iPad with iOS 10 & iOS 9
The iPad Mini series is missing the Split View feature presumably due to the smaller screen size of that device, and though older...
Read more >How to use Split View on a Mac | Digital Trends
Drag it to the top portion of either the left or right side of the screen, and it'll fill the top half of...
Read more >iPadOS 15: Everything We Know | MacRumors
iPadOS 15 is Apple's latest operating system for the iPad Provided to ... letting users enter Split View or Slide Over more easily, ......
Read more >ios - SwiftUI ToolbarItemGroup(placement: .principal) makes ...
If you look at the view hierarchy you see that that the buttons are cut off, the visible portions still work as expected....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This issue has not yet been fixed.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community’s attention? This issue may be closed if no further activity occurs. You may also label this issue as a “Discussion” or add it to the “Backlog” and I will leave it open. Thank you for your contributions.