From 8acb21732e2f1c67554848676d477ca5d94b5139 Mon Sep 17 00:00:00 2001 From: Ed Hager Date: Fri, 13 Sep 2013 10:45:00 -0400 Subject: [PATCH] Selection: fix problem with select-all feature overriding text editors --- Selection.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Selection.js b/Selection.js index 182fdfb52..7da1decb7 100644 --- a/Selection.js +++ b/Selection.js @@ -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"](); }