Merge pull request #6200 from kevinansfield/reset-tags-scope-on-deactivate

Reset shortcuts scope when leaving tags route
This commit is contained in:
Hannah Wolfe 2015-12-10 18:41:23 +00:00
commit cc3b9e9f53

View File

@ -1,3 +1,4 @@
/* global key */
import Ember from 'ember';
import AuthenticatedRoute from 'ghost/routes/authenticated';
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
@ -40,6 +41,7 @@ export default AuthenticatedRoute.extend(CurrentUserSettings, PaginationRoute, S
deactivate() {
this._super(...arguments);
this.send('resetShortcutsScope');
this.send('resetPagination');
},
@ -95,6 +97,10 @@ export default AuthenticatedRoute.extend(CurrentUserSettings, PaginationRoute, S
newTag() {
this.transitionTo('settings.tags.new');
},
resetShortcutsScope() {
key.setScope('default');
}
}
});