Skip to content

Commit

Permalink
Fixes #422, Sortables with Table rows crashes IE6.
Browse files Browse the repository at this point in the history
IE6 doesn't like inserting `div`s in `table`s.
  • Loading branch information
timwienk committed Oct 24, 2010
1 parent 9cdab67 commit 24c3ed1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Drag/Sortables.js
Expand Up @@ -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',
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 24c3ed1

Please sign in to comment.