Hi,

PFA patch to fix the issue where in SlickGrid column resize also triggers
'onHeaderClick' event and triggers column selection, In this
scenario before drag event which column is under mouse gets selected, So to
fix the issue we will check if header checkbox is clicked.
RM#2348

Please review.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/static/js/selection/column_selector.js 
b/web/pgadmin/static/js/selection/column_selector.js
index c89b3fa..5260fc3 100644
--- a/web/pgadmin/static/js/selection/column_selector.js
+++ b/web/pgadmin/static/js/selection/column_selector.js
@@ -6,12 +6,10 @@ define(['jquery', 'sources/selection/range_selection_helper', 
'slickgrid'], func
 
           if (column.selectable !== false) {
 
-            if (!clickedCheckbox(event)) {
+            if (clickedCheckbox(event)) {
               var $checkbox = $("[data-id='checkbox-" + column.id + "']");
-              toggleCheckbox($checkbox);
+              updateRanges(grid, column.id);
             }
-
-            updateRanges(grid, column.id);
           }
         }
       );
@@ -55,14 +53,6 @@ define(['jquery', 
'sources/selection/range_selection_helper', 'slickgrid'], func
       return e.target.type == "checkbox"
     };
 
-    var toggleCheckbox = function (checkbox) {
-      if (checkbox.prop("checked")) {
-        checkbox.prop("checked", false)
-      } else {
-        checkbox.prop("checked", true)
-      }
-    };
-
     var getColumnDefinitionsWithCheckboxes = function (columnDefinitions) {
       return _.map(columnDefinitions, function (columnDefinition) {
         if (columnDefinition.selectable !== false) {
-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to