Skip to content

Commit

Permalink
Prevent default behaviour on Ctrl+A
Browse files Browse the repository at this point in the history
-- only seemed to be a problem in FireFox
  • Loading branch information
Ian Prest committed Oct 15, 2013
1 parent fb3e97b commit 0710873
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kb.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
'shift-75': 'nextKey($event)',
113: 'focusEditor()',
esc: 'unselectAll()',
'ctrl-65': 'selectAll()',
'ctrl-65': 'selectAll($event)',
'ctrl-67 ctrl-45': 'copy($event)',
'ctrl-88 shift-46': 'cut($event)',
'ctrl-86 shift-45': 'paste($event)',
Expand Down
3 changes: 2 additions & 1 deletion kb.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@
$scope.selectedKeys = [];
$scope.multi = {};
};
$scope.selectAll = function() {
$scope.selectAll = function(event) {
if(event) { event.preventDefault(); }
sortKeys($scope.keys());
$scope.unselectAll();
$scope.keys().forEach(function(key) {
Expand Down

0 comments on commit 0710873

Please sign in to comment.