Skip to content

Commit

Permalink
Selection: fix problem with select-all feature overriding text editors
Browse files Browse the repository at this point in the history
  • Loading branch information
edhager authored and Kenneth G. Franqueiro committed Sep 13, 2013
1 parent 4a497e5 commit 8acb217
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,14 @@ return declare(null, {
});
}

// If allowSelectAll is true, allow ctrl/cmd+A to (de)select all rows.
// If allowSelectAll is true, bind ctrl/cmd+A to (de)select all rows,
// unless the event was received from an editor component.
// (Handler further checks against _allowSelectAll, which may be updated
// if selectionMode is changed post-init.)
if(this.allowSelectAll){
this.on("keydown", function(event) {
if (event[ctrlEquiv] && event.keyCode == 65) {
if(event[ctrlEquiv] && event.keyCode == 65 &&
!/\bdgrid-input\b/.test(event.target.className)){
event.preventDefault();
grid[grid.allSelected ? "clearSelection" : "selectAll"]();
}
Expand Down

0 comments on commit 8acb217

Please sign in to comment.