Skip to content

Instantly share code, notes, and snippets.

@elithrar
Last active January 10, 2016 14:03
Show Gist options
  • Save elithrar/73888deb185282701309 to your computer and use it in GitHub Desktop.
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
// 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