-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
fix: workaround for mChrome empty space when navigating after address bar collapses #11366
fix: workaround for mChrome empty space when navigating after address bar collapses #11366
Conversation
✅ Deploy Preview for react-navigation-example ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #11366 +/- ##
==========================================
- Coverage 75.69% 75.57% -0.12%
==========================================
Files 202 202
Lines 5854 5864 +10
Branches 2304 2307 +3
==========================================
+ Hits 4431 4432 +1
- Misses 1372 1381 +9
Partials 51 51
☔ View full report in Codecov by Sentry. |
Pinging about this, so that it does not get forgotten |
@satya164 Pinging so that it does not get forgotten |
85d6afc
to
ab93902
Compare
ab93902
to
b34cf19
Compare
34ca2e9
to
03b177b
Compare
03b177b
to
bc1fb12
Compare
0aa248b
to
e4ad88b
Compare
e4ad88b
to
1f9c815
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirm it works on my S22 Ultra and treat the issue was visible earlier.
The issue doesn't seem tobe visible on any other browser (including chrome on iOS)
If you want, I feel confident to go forward with the PR |
Motivation
Related to #11274 and Expensify/App#15749.
In mobile Chrome, the address bar collapses, which causes some problems: in an SPA and using a
flex: 1; height: 100%
style for the document, if the navigation is made with the address bar collapsed, it will show an empty space at the bottom of the screen (only visible if there are differences in background color).A possible fix is updating the body height using viewport height units based on the
window.innerHeight
, which should have the correct height taking into consideration the collapsed address bar.Resources:
Test plan
Run the example app in mobile chrome
AuthFlow example code modified to test this exact scenario
Screen.Recording.2023-05-10.at.15.45.11.mov
Screen.Recording.2023-05-10.at.15.44.50.mov
This next video contains an example of the modified AuthFlow with the fix applied. As it can be seen, if there is bottom content, it will cut when the address bar comes back.
hum.mov