Skip to content

Dimensions "change" event does not fire on Apple Silicon/M1 (running iPad-built app) until window is blurred #36118

Description

@LinusU

Description

When running an app built for iOS on your Apple Silicon Mac, the dimensions doesn't update when resizing the window. Only after focusing another application does it update.

(see also #30648)

Version

0.70.5

Output of npx react-native info

System:
OS: macOS 13.1
CPU: (8) arm64 Apple M1
Memory: 104.56 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
Yarn: 1.22.19 - ~/coding/loco/order/node_modules/.bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
Watchman: 2022.12.26.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: javac 17 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0 react-native: 0.70.5 => 0.70.5 react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found

Steps to reproduce

  1. Create a new React Native project and replace the app.js file with the code below.
  2. Build and run on an Apple Silicon / M1 Mac and resize the window.
  3. Observe that the numbers aren't changing.

Snack, code example, screenshot, or link to a repository

import{Text,View,useWindowDimensions}from'react-native'exportdefaultfunctionApp(){const{ width, height }=useWindowDimensions()return(<Viewstyle={{padding: 64}}><Text>width: {width}, height: {height}</Text></View>)}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions