Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problem with Selection.js breaking select-all feature in editor widgets #711

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Selection.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define(["dojo/_base/kernel", "dojo/_base/declare", "dojo/_base/Deferred", "dojo/on", "dojo/has", "dojo/aspect", "./List", "dojo/has!touch?./util/touch", "put-selector/put", "dojo/query", "dojo/_base/sniff"],
function(kernel, declare, Deferred, on, has, aspect, List, touchUtil, put){
define(["dojo/_base/kernel", "dojo/_base/declare", "dojo/_base/Deferred", "dojo/dom-class", "dojo/on", "dojo/has", "dojo/aspect", "./List", "dojo/has!touch?./util/touch", "put-selector/put", "dojo/query", "dojo/_base/sniff"],
function(kernel, declare, Deferred, domClass, on, has, aspect, List, touchUtil, put){

has.add("mspointer", function(global, doc, element){
return "onmspointerdown" in element;
Expand Down Expand Up @@ -310,9 +310,12 @@ return declare(null, {
// if selectionMode is changed post-init.)
if(this.allowSelectAll){
this.on("keydown", function(event) {
if (event[ctrlEquiv] && event.keyCode == 65) {
event.preventDefault();
grid[grid.allSelected ? "clearSelection" : "selectAll"]();
// Don't interrupt an input widget's select all functionality.
if(!domClass.contains(event.target, "dgrid-input")){
if(event[ctrlEquiv] && event.keyCode == 65){
event.preventDefault();
grid[grid.allSelected ? "clearSelection" : "selectAll"]();
}
}
});
}
Expand Down