From 24c3ed18bb61138e2cf9938e324c9a7c2c6b38dc 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 92949820..dfe9e67f 100644 --- a/Source/Drag/Sortables.js +++ b/Source/Drag/Sortables.js @@ -95,7 +95,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 ($type(this.options.clone) == 'function') return this.options.clone.call(this, event, element, this.list); var clone = element.clone(true).setStyles({ margin: '0px', @@ -170,7 +170,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,