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

[SL] Mobile navigation not sending to beginning of narrative #467

Open
hobuobi opened this issue Jul 29, 2021 · 1 comment
Open

[SL] Mobile navigation not sending to beginning of narrative #467

hobuobi opened this issue Jul 29, 2021 · 1 comment

Comments

@hobuobi
Copy link

hobuobi commented Jul 29, 2021

It seems that upon switching pages using the menu, we jump to the corresponding page number of the destination page:

To Reproduce:

  1. Start at prison/3, the incarcerated population over time section
  2. Click "Parole" in navigation menu.
  3. Note that the app takes you to parole/3 (parole population over time) rather than parole/1 (the intro section).

Ideal behavior: Clicking on a narrative leads you to the beginning of the narrative.

https://images.zenhubusercontent.com/275731776/21918638-f53d-4f48-b835-68741c1c947c/image_from_ios.mp4

@macfarlandian
Copy link
Collaborator

did some investigation today and determined that this is not a straightforward fix but nor is it a launch blocker. leaving some notes for posterity for now:

I have only been able to repro this issue on a physical iOS device (not in mac safari or in the iOS Simulator) - my own as well as via Browserstack (iOS 14 and 12). It's pretty consistent but somewhat intermittent, and accompanied by a few other scrolling issues that I suspect are related:

  • jumping to the top of the page by tapping the top bar doesn't work - it scrolls to the top and then jumps right back to the previous position. (this happens about as reliably as the first issue)
  • you can get stuck on a section, after every scroll you are snapped right back to the top of that section even if you are not within scroll-snapping range (much more intermittent, possibly not related)

technical notes for when we try to fix this
a bit of debugging revealed that, after navigating to the new page, the first section scrolls into view as expected but then there is immediately an extra firing of the intersection observer for section 3 - and not for any other sections in between. This usually happens so fast as to be invisible but can be observed with console logs etc. I haven't seen this happen in any other browser and have no real clue as to why it's happening here. Could be a quirk of the browser engine, some non-deterministic order of operations that scrambles the transition between pages, some "helpful" native scroll management behavior that our internal navigation feature is competing with, the influence of moon gravity, I really have no idea. The next step would probably be to dig more into that and try to find a lead

@macfarlandian macfarlandian removed their assignment Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants