Cannot add multiple callbacks to the same combo.
See original GitHub issueNot sure if feature or bug, consider this script.
app.controller('ParentCtrl', function($scope, hotkeys) {
hotkeys.bindTo($scope).add({
combo: 'enter',
allowIn: ['INPUT', 'TEXTAREA'],
callback: function($evt) {
$evt.preventDefault();
logKeypress($evt);
}
});
});
app.controller('ChildCtrl1', function($scope, hotkeys) {
hotkeys.bindTo($scope).add({
combo: 'enter',
allowIn: ['INPUT', 'TEXTAREA'],
callback: function($evt) {
// Do something else ...
}
});
});
I wanted to override the default browser submit action and add custom actions for the ENTER key for each ng-view
controller, but when ChildCtrl1
is in action, callback in ParentCtrl
won’t fire.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
javascript handling multiple callback mutexes - Stack Overflow
Here I had a question about Javascript and concurrency. Can't the 2 callbacks be called at the same time similar to when working...
Read more >Multiple callbacks for an output - Dash Python
Try combining your inputs and callback functions together into one function assume as a sketch example I have html.Button(id="reset") html.
Read more >Memoizing downshift useCombobox callbacks with useCallback
Working on this: https://github.com/downshift-js/downshift/issues/1050.
Read more >the target for the callback could not be found or did ... - Telerik
I have the same rad combobox on a child page and it works fine.... except ... < asp:TableCell ColumnSpan = "2" style =...
Read more >optparse — Parser for command line options — Python 3.11.1 ...
These are the only two option syntaxes provided by optparse . ... Here we have two different options with the same destination, which...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
… and this is the reason: https://github.com/chieffancypants/angular-hotkeys/commit/a3b4b4c233abca579d186543b46c011580a42f65#diff-30ea385d3977d7c1a62acdb050ea857aR338
+1