ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Column Moving issues when used with other features

Open swalters opened this issue 11 years ago • 6 comments

@jpuri can you take a look at these issues?

Recreatable with http://ui-grid.info/docs/#/tutorial/401_AllFeatures

  1. Click in a Filter Field. move your mouse left or right. The column move thinks you are trying to move the column.
  2. Scroll all the way to the right. Try to move the last column over 1 position. It doesn't work correctly
  3. When you are moving a column and hover over the column menu, the menu drops down.

Maybe we should add a move column 'anchor' instead of of relying on the entire column header as the anchor.

swalters avatar Dec 02 '14 15:12 swalters

@swalters, thanks for bringing up these issues:

  • 2 is apparently a new issue that has come with probably my latest changes, I will fix this.
  • You are right we having an anchor for move column will be nice. I will fix current issue with filters and will start to find some good design for move column anchor.

jpuri avatar Dec 02 '14 18:12 jpuri

Point (1) above has been fixed. Also, @swalters, I could not exactly replicate point-3, can you detail that.

jpuri avatar Dec 03 '14 06:12 jpuri

The problem with point 1 is that the column stay in drag state even if you release the mouse button. Instead of an anchor, it would be nice to stop moving columns as soon as you release the mouse button.

sbrouil avatar Dec 05 '14 13:12 sbrouil

Im not sure if this is what Sylvain is referencing, but a major issue is that the mouseup handler doesn't get registered until the element is cloned in cloneElement() which doesnt get called until the user has moved at least 50 units:

if (!elmCloned && Math.abs(changeValue) > 50) {
    cloneElement();
}

an issue occurs if the user clicks on the header without moving the mouse enough to clone the element (ie the user clicks to sort). In this case, the mousedown event gets registered but the mouseup(which handles all the mousemove cleanup etc) event doesnt get registered in time.

is there a reason we cant register the mouseup and mousemove handlers at the same time and in the mouseuphandler:

var mouseUpHandler = function (evt) {

    ...

    if(elmCloned) {
       //user wants to move something because he/she moved the mouse without letting go!
    } else {
       //user didnt move the mouse much he/she was probably sorting or clicking on the input box
    }

    //deregister everything here
}

MeMea66 avatar Dec 12 '14 22:12 MeMea66

I have already done changes for this. This must have got merged in trunk in PR #2265 merged yesterday. Please check latest code.

jpuri avatar Dec 15 '14 04:12 jpuri

No response after 2 weeks. Closing.

c0bra avatar Dec 29 '14 15:12 c0bra