Skip to content

Commit 1a487a1

Browse files
author
Paul Bakaus
committed
sortable: fixed #5322 (helper position weird when axis was used, fixes sortable tabs demo)
1 parent 7799b4e commit 1a487a1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ui/jquery.ui.sortable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ $.widget("ui.sortable", $.ui.mouse, {
270270
this.positionAbs = this._convertPositionTo("absolute");
271271

272272
//Set the helper position
273-
if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
274-
if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
273+
this.helper[0].style.left = this.options.axis == "y" ? this.originalPosition.left+'px' : this.position.left+'px';
274+
this.helper[0].style.top = this.options.axis == "x" ? this.originalPosition.top+'px' : this.position.top+'px';
275275

276276
//Rearrange
277277
for (var i = this.items.length - 1; i >= 0; i--) {

0 commit comments

Comments
 (0)