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.

White line in the top of the screen after navigate between screens

See original GitHub issue

Description

When switching between screens, a white line appears at the top of the screen and also background color is flickering. This problem is solved by adding detachInactiveScreens={false} to the props navigator. However, when calling enableScreens(false), the problem remains.

Since the detachInactiveScreens prop in CardStack(react-navigation) will always be boolean (not undefined), the check is const { enabled = ENABLE_SCREENS, hasTwoStates, ...rest } = props; will never work. Therefore, enableScreens will not work as expected.

It seems to me that the bug is very similar to https://github.com/software-mansion/react-native-screens/issues/111, but this issue was created using react-navigation v.4-5 and react-native-screens v.1.0.0-alpha.22. This issue has been closed, but a similar bug still appears on both platforms.

Is it still necessary to set detachInactiveScreens for some stacks so that the animation runs smoothly?

Screenshots

IOS

https://user-images.githubusercontent.com/44681387/151158705-9718453b-b6b9-4eca-9508-9f51806868c5.mov

Android

https://user-images.githubusercontent.com/44681387/151158804-bcac9080-7f39-4a89-b18c-d763d70dd537.mp4

Steps To Reproduce

  1. Tap on the “Go to second screen” button

Expected behavior

Animation should occur without a white line appearing at the top of the screen and changing the color of the header

Actual behavior

After transition white line presented in the top of the screen and header background color is flickering.

Reproduction

repo: https://github.com/RadkevichDenis/animation_bug

Platform

  • iOS
  • Android
  • Web
  • Windows
  • tvOS

Workflow

  • Managed workflow
  • Bare workflow

Package versions

package version
react-native 0.66.4
@react-navigation/native ^6.0.6
@react-navigation/native-stack -
react-native-screens ~3.10.2
react-native-safe-area-context ^3.3.2
react-native-gesture-handler ^1.10.3
react-native-reanimated 2.3.1
expo -

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
kirillzyuskocommented, Jan 31, 2022

I just realized that, regarding the issue details, this error does happen on stack but not on native-stack? If yes, thats the wrong repo, isn’t it?

Maybe, but the boundaries of this issue are blurred 🙈 The functionality of the stack is toughly related to react-native-screens and honestly I don’t know, where this issue should live. Just technically stack simply uses components from this library. If they use it in incorrect way, then of course the issue should be moved to react-navigation repo, but for me it seems like react-navigation do it right. Though it’s only my opinion, feel free to correct me 🙂

0reactions
WoLewickicommented, Feb 2, 2022

Unfortunately I don’t know. If you don’t spot any new issues with the decreased value, you can submit a PR with such a change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

White bar covering the top portion of my Main monitor screen
I have a work around this, when I Press F11 to fullscreen it (it still has the white bar at fullscreen) and press...
Read more >
Windows 10: White bar on upper corner (dual screen mode)
Right click desktop, go to Intel HD Graphics settings. Select Display and then choose the option Scale Full Screen. Make sure the option ......
Read more >
Stripes on your screen? This is probably the solution
The drivers of your monitor are outdated, which causes flickering or stripes. Updating these drivers is a simple and efficient solution. Go ......
Read more >
What is the white line along the top of my screen? ...
Question: I have my picture settings set to Screen Fit instead of 16:9 and on some stations when they go from hi-def to...
Read more >
White line above BottomTabNavigator in react-native
This line cannot be removed it seems. It'a coming by default when BottomTab is rendered to differentiate BottomTab and rest of the screen....
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