sortable: Another regex for the innerHTML copying in the placeholder, removes the expando attribute in IE (fixes #3541)

This commit is contained in:
Paul Bakaus 2008-11-24 13:48:50 +00:00
parent 3d87c249fc
commit 19a7d6bc5b

View File

@ -646,7 +646,9 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
if(!className) { if(!className) {
el.style.visibility = "hidden"; el.style.visibility = "hidden";
document.body.appendChild(el); document.body.appendChild(el);
el.innerHTML = self.currentItem[0].innerHTML.replace(/name\=\"[^\"\']+\"/g, ''); //Name attributes are removed, otherwice causes elements to be unchecked // Name attributes are removed, otherwice causes elements to be unchecked
// Expando attributes also have to be removed because of stupid IE (no condition, doesn't hurt in other browsers)
el.innerHTML = self.currentItem[0].innerHTML.replace(/name\=\"[^\"\']+\"/g, '').replace(/jQuery[0-9]+\=\"[^\"\']+\"/g, '');
document.body.removeChild(el); document.body.removeChild(el);
}; };