codefortulsa / food4thought

Angular/Express.js app that allows user to find nearby food sites for the summer food program.
https://meals4kidsok.org
MIT License
12 stars 9 forks source link

Page Anchors #40

Open rcomeau14 opened 6 years ago

rcomeau14 commented 6 years ago

Right now if you navigate from one page to another it does not start you at the top of the page. Can we anchor pages to the top?

Chromaticdeth19XX commented 6 years ago

There seems to be a number of ways to cure this but not all of them are mobile compatible. I am reading through this github issue thread: https://github.com/angular/angular/issues/7791. One of the more recent posts seems to address the handling of mobile and desktop views. I'm going to be working on this one.

Chromaticdeth19XX commented 6 years ago

Just pushed up some prototype code, we'll see what happens to the scroll behavior soon.

Chromaticdeth19XX commented 6 years ago

Erroneous behavior manifested as such: The user scrolls down the middle of the Full Directory page, the user clicks the About tab, and the About page loads at the same pixel coordinate as the Full Directory page. The same does not hold true for navigating to the middle of the About page and clicking over to the Full Directory page. The Full Directory page places the user at the pixel coordinate of (0,0) at the top of the page.

I have issued a fix that returns the user to the top of the About page after navigating the Full Directory page. It's a little crude but it works.