Bug Tracker

Current Project: Guriddo jqGrid JS

Issue ID# 20 Column does not sort on the first click after dragging the column header and dropping it in the same
Status: Resolved Version: 5.2 Priority: 3
Assigned to: tony Submitted by: bencarnes Attached file:
Type: Bug Submitted:
2017-03-01 00:00:00 UTC
Last Update:
2017-03-02 11:48:47 UTC
Description: Steps to reproduce:
1) go to your column reorder demo: http://www.guriddo.net/demo/guriddojs/functionality/column_reorder/index.html
2) mouse-down on the header of a sortable column.
3) drag the column header any distance
4) drop the column header on it's original location so the columns do not get reordered.
5) Click the column header you just dropped.
EXPECTED: The rows should sort on the clicked column.
ACTUAL: Nothing happens. If you click again, then it sorts.

When debugging I found that disableClick gets set to true when the drag starts. However, it never gets set back to false if the drag stops without any update to the sortable column headers (due to the user dropping the column where it started).

I implemented a simple fix that appears to work but it would be nice if this bug was fixed in the official product.

My fix that appears to work was to add the following to sortable_opts:

"stop": function(event, ui) {
ts.p.disableClick = false;


Stay connected with us in your favorite flavor!