You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flickering of last item if items have different widths #1686
When using a grid that contains items of different widths, a flickering issue occurs when dragging the last element of the last row. Dragging any other element seems to work fine. This issue appears both on Chrome (78.0.3904.97), Firefox (69.0.1) and IE Edge (44.18362.449.0). Funnily enough, it doesn't appear on IE (11.476.18362.0).
@RubaXa@owen-m1 I am still seeing this issue. Happens when elements have different heights as well. I have forceFallback: true as well. Would really love to get a solution for this
Hey folks, it seems to occur because of the threshold of the swap zone. I think this issue must be solved internally, but while there's no fix, try to set the swapThreshold option to something less than 1. By decreasing this option's value (as explained here) little by little, you will see the flicker/jumps happening less and less, until the chances that a user triggers the issue becomes acceptable. For me, setting swapThreshold: 0.5 completely "fixes" the issue.
My two cents guess is that on some configurations, two swap zones overlap each other, triggering multiple swaps at the same time in an infinite loop.
Activity
owen-m1 commentedon Feb 16, 2020
I knew this case was possible, but I didn't solve it because I didn't think anyone would find it 😄
dzero1 commentedon Apr 22, 2021
Having similar problem to this. Any solution?
In my case I guess this happen becase of the placeholder underneath. Check this out
I this case, each "SEED X" item is a sortablejs object. So there will be only one item inside and it'll be the last always.
EtienneTLM commentedon Jun 30, 2021
Same issue. In my case it happens randomly, no regard to the item level.
Demo
https://user-images.githubusercontent.com/18191493/124004508-14b2e900-d9a6-11eb-94e2-42a13ead1506.mp4
Initialization

Any solution?
sabuz commentedon Feb 21, 2022
@owen-m1 Any update?
ayushm-agrawal commentedon Sep 7, 2022
@RubaXa @owen-m1 I am still seeing this issue. Happens when elements have different heights as well. I have forceFallback: true as well. Would really love to get a solution for this
sabuz commentedon Sep 8, 2022
I got a solution. You'll have to add a hidden item at the end, and then disable drop after and sort for that hidden item.
ayushm-agrawal commentedon Sep 8, 2022
@sabuz Do you mind creating a quick fiddle with this solution?
ajacquierbret commentedon Jun 29, 2023
Hey folks, it seems to occur because of the threshold of the swap zone. I think this issue must be solved internally, but while there's no fix, try to set the
swapThresholdoption to something less than1. By decreasing this option's value (as explained here) little by little, you will see the flicker/jumps happening less and less, until the chances that a user triggers the issue becomes acceptable. For me, settingswapThreshold: 0.5completely "fixes" the issue.My two cents guess is that on some configurations, two swap zones overlap each other, triggering multiple swaps at the same time in an infinite loop.
#1686: Use parent rect in ghostIsLast & ghostIsFirst
owen-m1 commentedon Nov 30, 2023
Sorry this took so long to fix. It should be fixed in 1.15.1.
[Snyk] Upgrade sortablejs from 1.15.0 to 1.15.3 (#5)