Ensure scroll position reset

This adds a new mixin that allows us to opt in to scroll reset
behavior.
This commit is contained in:
Curtis Ekstrom 2016-02-16 14:10:12 +01:00
parent c118153f2f
commit 2ae61562ea
2 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,8 @@
import Ember from 'ember';
export default Ember.Mixin.create({
activate: function() {
this._super(...arguments);
window.scrollTo(0,0);
}
});

View File

@ -1,8 +1,9 @@
import TravisRoute from 'travis/routes/basic';
import Repo from 'travis/models/repo';
import ScrollResetMixin from 'travis/mixins/scroll-reset';
import Ember from 'ember';
export default TravisRoute.extend({
export default TravisRoute.extend(ScrollResetMixin, {
store: Ember.inject.service(),
titleToken(model) {