Merge pull request #458 from fauxton/fix_sidebar_links
Remove click handler overriding default link behavior
This commit is contained in:
commit
9f636b986c
|
@ -23,10 +23,5 @@ export default Ember.Component.extend(Polling, {
|
|||
scrollTop: 0
|
||||
}, 200);
|
||||
}
|
||||
},
|
||||
|
||||
click() {
|
||||
this.scrollTop();
|
||||
return this.get('routing').transitionTo('repo', this.get('repo.slug').split('/'));
|
||||
}
|
||||
});
|
||||
|
|
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