question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dimensions doesn't work as expected on initially entering split-view (iPad)

See original GitHub issue

Description

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

  1. Open the app on an iPad.
  2. See that Dimensions.get('window').width returns the expected width.
  3. Enter split-view.
  4. See that the the dimensions change event isn’t fired and that Dimensions.get('window').width returns the old width.
  5. Resize the app. See that the dimensions change event fires as expected and that Dimensions.get('window').width returns the expected width.

Expected Results

  1. Open the app on an iPad.
  2. See that Dimensions.get('window').width returns the expected width.
  3. Enter split-view.
  4. See that the the dimensions change event is fired and that Dimensions.get('window').width returns the new width.
  5. 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

https://snack.expo.io/@bryanjclark/rn-bug---dimensions Dimensions does not update on initial Split View

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
hblumbergcommented, Dec 26, 2020

This issue has not yet been fixed.

1reaction
stale[bot]commented, Dec 26, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found