Sortable: Helper jumps to the left side of the page when start dragging second time
When you reorder some element for the first time it is ok. When you start dragging the same element again helper jumps to the left side of the page.
It is only reproducible in Firefox when sortable elements have 'position:related' CSS rule and sortable option {axis: "y"} is set.
I've used the workaround like this:
- var element = $(URLS_CONTAINER);
- $(URLS_CONTAINER).sortable({
- ...
- start:function(event, ui){
- if (ui.helper && ui.helper[0] && ui.helper[0].style) {
- ui.helper[0].style.left = element[0].offsetLeft + 'px';
- }
- }
- });