-
-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[native-stack] Focused search bar causes new screens to have incorrect header #996
Comments
Setting Also, I'd prefer to have |
123925662-55fec500-d9b5-11eb-9cf9-f3a1f4670c64.mp4i'm having same problem. Is it caused by createNativeStackNavigator() ? |
@nandorojo Thanks for finding it. Unfortunately this is a native iOS issue stack overflow. There is no easy fix on our side and we don't want to introduce very complex native logic to create workaround. After inspecting this issue I came up with a JS workaround that should work for you. If it works for you, please let us know. |
What you can also do is wrap content in |
I’ll try this, thanks! |
If it works for you, please let us know. Additionally #1153 is fixing the header bug, so you can test it too |
## Description Fixes issue #996. More about native issue https://stackoverflow.com/questions/51402566/navigation-bar-issue-when-search-is-active-and-push-to-next-view-controller
@nandorojo I merged #1153 and therefore I am closing the issue. |
Description
I'm using the iOS search bar to search artists. Works as expected.
When you click on an artist, it opens the
Artist
screen.The
Artist
screen hasheaderShown: false
, since I have a custom header on that screen.However, if I open the artist screen while the search bar is focused, it adds a header to the
Artist
screen, and creates a glitchy experience when I go back.Screenshots
Works
When the search bar is not focused, and I click an artist, it works normally. It navigates to the
Artist
screen, and there's no header.Video: https://www.loom.com/share/174403203eb941f9a5731ba62253ab11
Doesn't work
However, when the search bar is focused, it incorrectly adds a header to the
Artist
screen. Then, going back causes a weird jump.Video: https://www.loom.com/share/8f8037145df649f880b891f52b099520
Steps To Reproduce
headerShown: false
while the search bar is focused.Expected behavior
Having a
searchBar
should not add a header when opening a screen that hasheaderShown: false
.Actual behavior
A focused
searchBar
causes screens opened to have a header. It also causes a layout glitch when you go back. I havecontentInsetAdjustmentBehavior="automatic"
on myScrollView
like I saw in theTestExample
file.Snack or minimal code example
Expo Snack doesn't support 3.4.0. Let me know if you need me to make a full reproduction.
Package versions
The text was updated successfully, but these errors were encountered: