Skip to content
Browse files

Defer setting of scope in setScope to prevent potential loop or calli…

…ng callbacks from different scope for the same shortcut. Fixes #28. Fixes #48
  • Loading branch information...
1 parent c61b3fe commit 5782b14e5e8684cf636580983addfe4184f8acfa @okonet committed Aug 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 keymaster.js
View
2 keymaster.js
@@ -141,7 +141,7 @@
for(k in _MODIFIERS) assignKey[k] = false;
// set current scope (default 'all')
- function setScope(scope){ _scope = scope || 'all' };
+ function setScope(scope){ setTimeout(function(){ _scope = scope || 'all' }, 0) };
function getScope(){ return _scope || 'all' };
// delete all handlers for a given scope

0 comments on commit 5782b14

Please sign in to comment.
Something went wrong with that request. Please try again.