From ba3fbe101bdfc17bf3eafda8427835bb35451cde Mon Sep 17 00:00:00 2001 From: Mateusz Uzdowski Date: Wed, 24 Mar 2010 04:01:25 +0000 Subject: [PATCH] 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 --- javascript/AssetAdmin.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/javascript/AssetAdmin.js b/javascript/AssetAdmin.js index 4f8a4de0..5b910d9d 100755 --- a/javascript/AssetAdmin.js +++ b/javascript/AssetAdmin.js @@ -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