0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

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
This commit is contained in:
Kevin Ansfield 2015-09-11 09:54:55 +01:00
parent 4ff23ec9f0
commit 010bd4ed90

View file

@ -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);
});
},