From 78240e186b05d6ed23ad677a6df3f0c8257d36ff Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Thu, 10 Dec 2015 12:27:48 +0000 Subject: [PATCH] Reset shortcuts scope when leaving tags route 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 --- core/client/app/routes/settings/tags.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/client/app/routes/settings/tags.js b/core/client/app/routes/settings/tags.js index 94da5d51bc..af2b9a0e3a 100644 --- a/core/client/app/routes/settings/tags.js +++ b/core/client/app/routes/settings/tags.js @@ -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'); } } });