Skip to content
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

Mobile: scrolling to the bottom and opening navigation causes the view to jump #37

Closed
Brian-Pho opened this issue Mar 2, 2020 · 12 comments
Labels
compatibility Browser type/version or OS compatibility
Milestone

Comments

@Brian-Pho
Copy link

Brian-Pho commented Mar 2, 2020

Describe the bug
The bug is unexpected behaviour when the user is on mobile and returns from navigation.

To Reproduce

  1. Go to https://chirpy.cotes.info/posts/write-a-new-post/.
  2. Open up Chrome Dev Tool and enter mobile view (Toggle device toolbar) with device "Pixel 2" selected.
  3. Scroll down to the bottom of the page.
  4. Open navigation.
  5. Close the navigation.

Expected behavior
The view should not jump after going to navigation.

Screenshots

  1. Scroll to bottom:
  2. Click on nav:
  3. Click on grey area:

Desktop:

  • OS: Windows 10
  • Browser: Chrome
  • Version: 80

Smartphone:

  • Device: Pixel 2

Notes
This bug doesn't occur anywhere else on the page except when at the very bottom.

@Brian-Pho Brian-Pho added the bug Something isn't working label Mar 2, 2020
@cotes2020
Copy link
Owner

Thanks, this is a good bug report, it is detailed and reproducible, and I will take the time to deal with it.

@Pinnaclenetworking
Copy link

This may be an issue with animation speed settings in Android devtools... I am on .5 and it doesn't seem to "jump"

@cotes2020
Copy link
Owner

cotes2020 commented Mar 29, 2020

@Brian-Pho After testing, I found that this issue only occurs in device emulators for Chrome and Opera devtools; the simulator will automatically change the value of scrollTop to cause "jumps". This issue has not been found to occur in real mobile browsers, maybe we should just ignore it.

@Brian-Pho
Copy link
Author

@Brian-Pho After testing, I found that this issue only occurs in device emulators for Chrome and Opera devtools; the simulator will automatically change the value of scrollTop to cause "jumps". This issue has not been found to occur in real mobile browsers, maybe we should just ignore it.

I just tested it on my physical Pixel 3 device and it jumps. If you aren't seeing it anywhere else, feel free to ignore it. But if you have the fix please let me know because I'm using this theme for one of my websites. Thanks.

@cotes2020
Copy link
Owner

cotes2020 commented Mar 29, 2020

What's the type and version of broswer on your Pixel 3 device?

@cotes2020 cotes2020 added compatibility Browser type/version or OS compatibility and removed bug Something isn't working labels Mar 29, 2020
@Brian-Pho
Copy link
Author

What's the type and version of browser on your Pixel 3 device?

I'm using Chrome version 80.0.3987.149 on Android 10, Pixel 3 Build/QQ1A.191205.008

2Re-play pushed a commit to 2Re-play/2Re-play.github.io that referenced this issue Mar 31, 2020
- Header 및 Index Page 반응형 스타일 개선
- install mobile-detect package
- 모바일 환경에서 Header를 숨기지 않고 항상 표시하도록 구현
@cotes2020
Copy link
Owner

@Brian-Pho
Sorry for keeping you waiting so long. Now I have tried to fix this issue at 2395a34396946d89397e61a74fdbbb077c369c35 (it passed the test on Chrome devTool), but I don't have a physical Pixel 3. Could you be a volunteer to help me test whether this compatibility problem is solved or not?

cotes2020 added a commit that referenced this issue Apr 16, 2020
@Pinnaclenetworking
Copy link

Pinnaclenetworking commented Apr 18, 2020 via email

@cotes2020
Copy link
Owner

I don't have a pixel 3 either.... Only a 2xl

If the Pixel 2 XL runs Android 10 & chrome 80, it should be enough to test the problem. P.S. I don't have any android devices, so I can't test it.

cotes2020 added a commit that referenced this issue Apr 18, 2020
@Brian-Pho
Copy link
Author

Brian-Pho commented Apr 19, 2020

My apologies for not responding. It is difficult to test the fix since this isn't deployed anywhere. I'll test it by applying the fix to my own site and commenting on my results.

@cotes2020
Copy link
Owner

It has been deployed to the demo site https://chirpy.cotes.info

@Brian-Pho
Copy link
Author

I can confirm the fix works on my Pixel 3, thanks for fixing. :)

cotes2020 added a commit that referenced this issue Apr 20, 2020
cotes2020 added a commit that referenced this issue Apr 24, 2020
@cotes2020 cotes2020 modified the milestones: v2.1, v2.2 May 16, 2020
cotes2020 added a commit that referenced this issue Sep 21, 2020
mattpopovich pushed a commit to mattpopovich/jekyll-theme-chirpy that referenced this issue Oct 3, 2020
cotes2020 added a commit that referenced this issue Oct 22, 2021
sanjidnet pushed a commit to sanjidnet/sanjidnet.github.io that referenced this issue Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Browser type/version or OS compatibility
Projects
None yet
Development

No branches or pull requests

3 participants