You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hotkeys.bindTo($scope).add({
combo: 's',
action: 'keydown',
description: 'Do a thing',
callback: function (event, hotkey) { /* profit! */ }
}
and a different hotkey in Controller B in the same way, except I omit the action:
hotkeys.bindTo($scope).add({
combo: 's',
description: 'Do a different thing',
callback: function (event, hotkey) { /* profit in another way! */ }
}
I load (in a web browser) an Angular route that uses only Controller A, then click a link to view a different route that uses only Controller B.
The hotkey works fine in the Controller A route, but does not work in Controller B's. The cheat sheet shows the hotkey in both cases, with the correct description for the respective controller. Once I remove the action on the first hotkey, the second hotkey starts working.
This feels like something is wrong when scrubbing the scope's keybinding state. I don't have a proof of concept (this behavior is in a much larger app), but please let me know if I can help. I'm using Angular 1.3.15 (a little old, but we haven't had a chance to upgrade) and the latest version of angular-hotkeys.
The text was updated successfully, but these errors were encountered:
+1 I believe I am experiencing the same thing using directives with bind logic (multiple directives = binds to the same keys) only binds and work for one of them.
I define a hotkey in Controller A like so:
and a different hotkey in Controller B in the same way, except I omit the
action
:I load (in a web browser) an Angular route that uses only Controller A, then click a link to view a different route that uses only Controller B.
The hotkey works fine in the Controller A route, but does not work in Controller B's. The cheat sheet shows the hotkey in both cases, with the correct description for the respective controller. Once I remove the
action
on the first hotkey, the second hotkey starts working.This feels like something is wrong when scrubbing the scope's keybinding state. I don't have a proof of concept (this behavior is in a much larger app), but please let me know if I can help. I'm using Angular 1.3.15 (a little old, but we haven't had a chance to upgrade) and the latest version of angular-hotkeys.
The text was updated successfully, but these errors were encountered: