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.

RN Alert button sometimes renders in the upper-left corner of the screen (iOS)

See original GitHub issue

Description

It appears that an RN Alert’s button occasionally appears in the top-left corner occasionally for some of our iOS users, and the only way to dismiss it is to force quit and re-open the app (or if the JS bundle reloads in debug mode). This Alert’s button does show up on top of any and all components that it covers up, but curiously all TouchableOpacity components that are covered up by this can still have touch events be triggered. For example, our back button in the screenshot example below works just fine, even though it’s covered up.

Version

0.66.2

Output of npx react-native info

System: OS: macOS 12.3.1 CPU: (10) arm64 Apple M1 Max Memory: 2.75 GB / 32.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 18.0.0 - /opt/homebrew/bin/node Yarn: 1.22.18 - /opt/homebrew/bin/yarn npm: 8.6.0 - /opt/homebrew/bin/npm Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 23, 30, 31 Build Tools: 30.0.2, 30.0.3, 31.0.0 System Images: android-31 | Google APIs ARM 64 v8a, android-32 | Google Play ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8193401 Xcode: 13.4/13F17a - /usr/bin/xcodebuild Languages: Java: 11.0.13 - /usr/bin/javac

Steps to reproduce

This happens quite randomly, with some users never experiencing it and other users seeing it all the time.

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

IMG_5539

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
henrik-dcommented, Jul 6, 2022

I have the same issue. I’m displaying the Alert inside useEffect, when the component mounts. For me the bug only occurs in release builds and only when showing the Alert directly after starting the app.

0reactions
kupilikulacommented, Nov 17, 2022

Same, happens only on release build.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RN Alert button sometimes renders in the upper-left corner of the ...
A framework for building native applications using React - RN Alert button sometimes renders in the upper-left corner of the screen (iOS) ...
Read more >
How to create a custom alert dialog in React Native
Learn how to create a custom alert dialog in React Native for Android or iOS, including their specification and UI differences.
Read more >
left side of screen untouchable when using NavigatorIOS react ...
I have this very strange bug on my react-native iOS app, when I'm using NavigatorIOS (need it) : there is a 30 points...
Read more >
Preventing going back - React Navigation
Sometimes you may want to prevent the user from leaving a screen, for example, if there are unsaved changes, you might want to...
Read more >
React Native: Set different colors on Top and Bottom ... - Medium
Sometimes, on top, we need to use a dark color on the status bar and with that, we can't see the status (hour,...
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