From c8270d7c0cb78f35b3a8dc6ac1d320dbcc42f8d8 Mon Sep 17 00:00:00 2001 From: Tim Wienk Date: Sun, 24 Oct 2010 17:20:38 +0200 Subject: [PATCH] Fixes #422, Sortables with Table rows crashes IE6. IE6 doesn't like inserting `div`s in `table`s. --- Source/Drag/Sortables.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Drag/Sortables.js b/Source/Drag/Sortables.js index d0a5abb1..7cf90db3 100644 --- a/Source/Drag/Sortables.js +++ b/Source/Drag/Sortables.js @@ -102,7 +102,7 @@ var Sortables = new Class({ }, getClone: function(event, element){ - if (!this.options.clone) return new Element('div').inject(document.body); + if (!this.options.clone) return new Element(element.tagName).inject(document.body); if (typeOf(this.options.clone) == 'function') return this.options.clone.call(this, event, element, this.list); var clone = element.clone(true).setStyles({ margin: 0, @@ -177,7 +177,7 @@ var Sortables = new Class({ this.element.set('opacity', this.opacity); if (this.effect){ var dim = this.element.getStyles('width', 'height'); - var pos = this.clone.computePosition(this.element.getPosition(this.clone.offsetParent)); + var pos = this.clone.computePosition(this.element.getPosition(this.clone.getOffsetParent())); this.effect.element = this.clone; this.effect.start({ top: pos.top,