Clear the document selection when selecting multiple rows.

This commit is contained in:
Andrew Smith 2012-06-01 23:32:54 +10:00 committed by Felix Schäfer
parent c8be011a93
commit 7c1b17509f
1 changed files with 8 additions and 0 deletions

View File

@ -174,6 +174,7 @@
addSelection: function(element) {
element.addClass(contextMenuSelectionClass);
methods.checkSelectionBox(element, true);
methods.clearDocumentSelection();
},
isSelected: function(element) {
return element.hasClass(contextMenuSelectionClass);
@ -208,6 +209,13 @@
methods.addSelection(self);
}
});
},
clearDocumentSelection: function() {
if(document.selection) {
document.selection.clear();
} else {
window.getSelection().removeAllRanges();
}
}
};