Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add option to enable text selection in grid cells

  • Loading branch information...
commit 61b294c125ee2f085c825b53cffaed7daf292a12 1 parent 5f88203
@saks authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 slick.grid.js
View
5 slick.grid.js
@@ -82,7 +82,8 @@ if (typeof Slick === "undefined") {
editorFactory: null,
cellFlashingCssClass: "flashing",
selectedCellCssClass: "selected",
- multiSelect: true
+ multiSelect: true,
+ enableTextSelectionOnCells: false
},
gridData;
@@ -237,7 +238,7 @@ if (typeof Slick === "undefined") {
// selection in grid cells (grid body) is already unavailable in
// all browsers except IE
disableSelection($headers); // disable all text selection in header (including input and textarea)
- $viewport.bind("selectstart.ui", function (event) { return $(event.target).is("input,textarea"); }); // disable text selection in grid cells except in input and textarea elements (this is IE-specific, because selectstart event will only fire in IE)
+ if (!options.enableTextSelectionOnCells) $viewport.bind("selectstart.ui", function (event) { return $(event.target).is("input,textarea"); }); // disable text selection in grid cells except in input and textarea elements (this is IE-specific, because selectstart event will only fire in IE)
createColumnHeaders();
setupColumnSort();
Please sign in to comment.
Something went wrong with that request. Please try again.