diff --git a/js/functions.js b/js/functions.js index e042c5a634..11e264e71a 100644 --- a/js/functions.js +++ b/js/functions.js @@ -612,7 +612,7 @@ $(document).ready(function() { var $tr = $(this); // make the table unselectable (to prevent default highlighting when shift+click) - $tr.parents('table').noSelect(); + //$tr.parents('table').noSelect(); if (!e.shiftKey || last_clicked_row == -1) { // usual click @@ -643,6 +643,7 @@ $(document).ready(function() { last_shift_clicked_row = -1; } else { // handle the shift click + PMA_clearSelection(); var start, end; // clear last shift click result @@ -3206,3 +3207,16 @@ $(document).ready(function() { return true; }); }); + +/** + * Clear text selection + */ +function PMA_clearSelection() { + if(document.selection && document.selection.empty) { + document.selection.empty(); + } else if(window.getSelection) { + var sel = window.getSelection(); + if(sel.empty) sel.empty(); + if(sel.removeAllRanges) sel.removeAllRanges(); + } +}