diff --git a/js/functions.js b/js/functions.js index 31f72ec9f4..fdff54dbf7 100644 --- a/js/functions.js +++ b/js/functions.js @@ -605,7 +605,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 @@ -636,6 +636,7 @@ $(document).ready(function() { last_shift_clicked_row = -1; } else { // handle the shift click + PMA_clearSelection(); var start, end; // clear last shift click result @@ -3093,3 +3094,16 @@ function PMA_getCellValue(td) { } } +/** + * 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(); + } +} +