gridstack.js icon indicating copy to clipboard operation
gridstack.js copied to clipboard

Positioning bug when having more than 10 items

Open leowns opened this issue 9 years ago • 6 comments

Subject of the issue

When having a one column gridstack with more than 10 items the dragging or resizing of the first element causes the last item of the grid to jump to the first position. Especially when I try to resize the first element the order gets completely messed up.

Your environment

  • gridstack.js 0.3.0
  • Google Chrome Version 61.0.3163.100

Steps to reproduce

I created a JsFiddle to reproduce the issue: https://jsfiddle.net/teq1ou97/3/

Expected behaviour

The last element should not move.

Actual behaviour

It jumps up to the first item in the gridstack

leowns avatar Sep 29 '17 07:09 leowns

Can confirm. I've been able to reproduce this issue in our production environment with a three-column Gridstack. I'd reckon this issue presents itself at any width. It's not a big problem for us since grids like those would never occur. But nontheless: this is unexpected, error throwing behaviour.

image

DnJealt avatar Sep 29 '17 13:09 DnJealt

I have an idea that @radiolips solved this in the 1.0 dev branch, as per issue #756 .

anthwri avatar Oct 02 '17 05:10 anthwri

Either #756 or another PR from around that time should fix it. @DnJealt or @leowns , could you try with the 1.0 dev branch?

radiolips avatar Feb 12 '18 20:02 radiolips

I can't find the 1.0-dev branch anymore.. :(

DnJealt avatar Feb 16 '18 11:02 DnJealt

@DnJealt The branch is called develop. Hope that helps :)

radiolips avatar Feb 16 '18 14:02 radiolips

Ah, the default branch, lol. It was right under my nose 😄

Goodmorning everyone, hope you've had a great weekend. I can confirm that this issue is no longer present in the v1.0.0-dev branch.

If you're still in v0.3.0 and just want this bug fixed, you can find the fix here. This is what we actually did because we were too afraid to update the rest back then.

DnJealt avatar Feb 19 '18 10:02 DnJealt