Ensure scroll position reset
This adds a new mixin that allows us to opt in to scroll reset behavior.
This commit is contained in:
parent
c118153f2f
commit
2ae61562ea
8
app/mixins/scroll-reset.js
Normal file
8
app/mixins/scroll-reset.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Mixin.create({
|
||||
activate: function() {
|
||||
this._super(...arguments);
|
||||
window.scrollTo(0,0);
|
||||
}
|
||||
});
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user