Skip to content

Commit

Permalink
Merge pull request #403 from tojonmz/protect-leftright-nav
Browse files Browse the repository at this point in the history
Bug 1089737 - Unbind left/right navigation in mousetrap inputs
  • Loading branch information
tojon committed Mar 5, 2015
2 parents d72ffd7 + 1321515 commit 2faca26
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion ui/js/controllers/main.js
Expand Up @@ -50,7 +50,20 @@ treeherder.controller('MainCtrl', [

// Disable single key shortcuts in specified shortcut events
$scope.allowKeys = function() {
Mousetrap.unbind(['i', 'j', 'n', 'k', 'p', 'space', 'u', 'r', 'c', 'f']);
Mousetrap.unbind([
'i', // Toggle display in-progress jobs (pending/running)
'j', // Select next unclassified failure
'n', // Select next unclassified failure
'k', // Select previous unclassified failure
'p', // Select previous unclassified failure
'space', // Pin selected job to pinboard
'u', // Display only unclassified failures
'r', // Pin selected job and add related bug
'c', // Pin selected job and add classification
'f', // Enter a custom job or platform filter
'left', // Select previous job
'right' // Select next job
]);
};

// Process shortcut events
Expand Down

0 comments on commit 2faca26

Please sign in to comment.