From f69197bcec073b6f73b26e93e5fc407b4c5e485e Mon Sep 17 00:00:00 2001 From: Eduardo Lundgren Date: Tue, 28 Oct 2008 06:35:01 +0000 Subject: Sortable - Checking if helper exists --- ui/ui.sortable.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ui') diff --git a/ui/ui.sortable.js b/ui/ui.sortable.js index 4178cdcd6..52e8b6578 100644 --- a/ui/ui.sortable.js +++ b/ui/ui.sortable.js @@ -628,9 +628,10 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, { this.positionAbs = this._convertPositionTo("absolute"); //Set the helper's position - this.helper[0].style.left = this.position.left+'px'; - this.helper[0].style.top = this.position.top+'px'; - + if (this.helper) { + this.helper[0].style.left = this.position.left+'px'; + this.helper[0].style.top = this.position.top+'px'; + } //Rearrange for (var i = this.items.length - 1; i >= 0; i--) { -- cgit v1.2.3