Last active
January 10, 2016 14:03
-
-
Save elithrar/73888deb185282701309 to your computer and use it in GitHub Desktop.
smartScroll for Ember.js - reset the scroll position on forward transitions you haven't previously visited - via @rwjblue on embercommunity.slack.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app/locations/history.js | |
export default Ember.HistoryLocation.extend({ | |
pushState() { | |
this._super(...arguments); | |
window.scrollTo(0, 0); | |
} | |
}); | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment