Clear the document selection when selecting multiple rows.
This commit is contained in:
parent
c8be011a93
commit
7c1b17509f
|
@ -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();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue