BUGFIX: IE does not accept TD element without a table, repacking into DIV (open #5228)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@101602 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Mateusz Uzdowski 2010-03-24 04:01:25 +00:00 committed by Sam Minnee
parent c8945d9819
commit ba3fbe101b

View File

@ -217,13 +217,13 @@ Object.extend( SubsDraggable.prototype , {
}
}
});
// gets element that should be dragged instead of original element
// returned element should be added to DOM tree, and will be deleted by dragdrop library
// Creates drag element by copying the content into DIV wrapper (IE does not like TD outside of tables)
// The drag element will be deleted by dragdrop library.
function getDragElement(element){
var el = element.cloneNode(true);
el.id = '';
document.body.appendChild(el);
return el;
wrap = document.createElement('div');
wrap.innerHTML = element.innerHTML;
document.body.appendChild(wrap);
return wrap;
}
// Set up DRAG handle