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.

headerLeft / headerRight / headerCenter disappearing when Android hardware back button functionality is used

See original GitHub issue

Description

We’re currently seeing an issue where if a user uses the hardware back button to pop off a screen the headerLeft / headerRight / headerCenter properties of the screen are being unmounted while the screen is still visible.

Screenshots

Here’s a video of using the software back button to go back a screen (notice how the headerCenter component (the Help Center title) stays visible throughout the entire transition) https://user-images.githubusercontent.com/7979579/108112834-44e39600-705c-11eb-95f9-dc046943a843.mp4

Here’s a video of using the hardware back button to go back a screen (notice how the headerCenter component (the Help Center title) is removed as the transition begins) https://user-images.githubusercontent.com/7979579/108112877-59c02980-705c-11eb-9632-2ee189768fdd.mp4

Steps To Reproduce

  1. Use the hardware back button to pop from a screen with headerLeft / headerRight / headerCenter properties set on it

Expected behavior

The properties remain visible during the duration of the animation

Actual behavior

All properties disappear as the transition begins

Snack or minimal code example

Package versions

  • React: 16.13.1
  • React Native: 0.63.3
  • React Native Screens: 2.17.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tomtargoszcommented, Feb 18, 2021

@WoLewicki confirmed that fixed the issue! Thank you so much to both you and @msvargas for the fast follow up on this! 😄

1reaction
WoLewickicommented, Feb 17, 2021

Oh, I see, I’m sorry. The issue also points that the same happens in react-native-fast-image iirc. Can you provide a simple reproduction of the issue then?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Header back button disappears on stand alone build
It seems to me like a bug. As a solution in this issue is stated. if you use expo you should include the...
Read more >
Header buttons | React Navigation
You can set buttons in the header through the headerLeft and headerRight properties in options . The back button is fully customizable with...
Read more >
Back button disappears randomly - OnePlus Community
While calling back button , centre button and window button gets disappeared and not visible. We can not back the device while call...
Read more >
Overriding Back Button in Xamarin.Forms Shell…
Forms Shell recently, both with Navigation bar button and Android hardware back button. So I decided to share my experience with yol and ......
Read more >
No back button rendering in header for ios with react ... - Reddit
It renders just fine on android. All that is rendered is the back text. I can still navigate back in the stack by...
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