Skip to content

Commit

Permalink
Reset shortcuts scope when leaving tags route
Browse files Browse the repository at this point in the history
refs #6191, #6192
- adds additional safeguard to tags route to ensure keymaster scope doesn't get stuck in a non-default scope that may break shortcuts elsewhere
  • Loading branch information
kevinansfield committed Dec 10, 2015
1 parent 70a481b commit 78240e1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/client/app/routes/settings/tags.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* global key */
import Ember from 'ember';
import AuthenticatedRoute from 'ghost/routes/authenticated';
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
Expand Down Expand Up @@ -40,6 +41,7 @@ export default AuthenticatedRoute.extend(CurrentUserSettings, PaginationRoute, S

deactivate() {
this._super(...arguments);
this.send('resetShortcutsScope');
this.send('resetPagination');
},

Expand Down Expand Up @@ -95,6 +97,10 @@ export default AuthenticatedRoute.extend(CurrentUserSettings, PaginationRoute, S

newTag() {
this.transitionTo('settings.tags.new');
},

resetShortcutsScope() {
key.setScope('default');
}
}
});

0 comments on commit 78240e1

Please sign in to comment.