Skip to content

Commit

Permalink
Merge pull request vitmalina#1692 from codertd/master
Browse files Browse the repository at this point in the history
Dragging a column to reorder can result in a ghost column you can no longer interact with.
  • Loading branch information
vitmalina authored Oct 23, 2017
2 parents f9d58f4 + 149f7f8 commit 486079c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/w2grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -5203,7 +5203,15 @@
_dragData.pressed = true;

_dragData.timeout = setTimeout(function(){
if ( !_dragData.pressed ) return;
// When dragging a column for reordering, a quick release and a secondary
// click may result in a bug where the column is ghosted to the screen,
// but can no longer be docked back into the header. It simply floats and you
// can no longer interact with it.
// The erronius event thats fired will have _dragData.numberPreColumnsPresent === 0
// populated, wheras a valid event will not.
// if we see the erronius event, dont allow that second click to register, which results
// in the floating column remaining under the mouse's control.
if ( !_dragData.pressed || _dragData.numberPreColumnsPresent === 0 ) return;

var edata,
columns,
Expand Down

0 comments on commit 486079c

Please sign in to comment.