From b24e121eb39b24cbea91064f101c6696184ae0c6 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Fri, 11 Sep 2015 09:54:55 +0100 Subject: [PATCH] Fix shortcut keys sometimes not being cleared due to scope changes closes #5813 - when transitioning away from a shortcuts route, always specify the scope when unbinding in keymaster to avoid issues when we are temporarily be in a different scope at time of transition --- core/client/app/mixins/shortcuts-route.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/client/app/mixins/shortcuts-route.js b/core/client/app/mixins/shortcuts-route.js index 8530cd3da9..8dfb61ecce 100644 --- a/core/client/app/mixins/shortcuts-route.js +++ b/core/client/app/mixins/shortcuts-route.js @@ -69,7 +69,8 @@ var ShortcutsRoute = Ember.Mixin.create({ var shortcuts = this.get('shortcuts'); Ember.keys(shortcuts).forEach(function (shortcut) { - key.unbind(shortcut); + var scope = shortcuts[shortcut].scope || 'default'; + key.unbind(shortcut, scope); }); },