ucd-library / intertwine

California's modern wine network
MIT License
1 stars 0 forks source link

Return to Top of Previous Page #45

Closed ldragoon closed 4 years ago

ldragoon commented 4 years ago

When a user navigates away from a page, when they return to the previous pages, the cursor should return to the top of the page.

ldragoon commented 4 years ago

Added code to perform this on line 52 of app-story.js

/**
   * @method _onAppStateUpdate
   * @description bound to AppStateModel app-state-update events
   *
   * @param {Object} e
   */
  async _onAppStateUpdate(e) {
    this.container.scrollTo(0,0); // return to top of page
wrenaria commented 4 years ago

Going back to the Homepage from anywhere else does not load it from the top if you were scrolled down when you left it (but it should).