question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot add multiple callbacks to the same combo.

See original GitHub issue

Not 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:open
  • Created 8 years ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found