#1714 closed defect (fixed)
Add TABLE element around dragged TBODY element
Reported by: | jcarreira | Owned by: | alex |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | DnD | Version: | 0.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
In HtmlDragAndDrop?.js in the createDragNode function, if the dragged node is a TR node, special care is taken to create TABLE and TBODY nodes to wrap around the TR node so it will lay out correctly while dragging. Since DND of TR's doesn't work in IE, it's preferable to use multiple TBODY segments as the DragSource?'s. Adding this code after the check for a TR node makes it work for TBODY nodes:
} else if (node.tagName.toLowerCase() == "tbody") {
dojo.debug("Dragging table body") Create a table for the cloned tbody var doc = this.domNode.ownerDocument; var table = doc.createElement("table"); table.appendChild(node);
Set a fixed width to the cloned TDs var domTrs = this.domNode.childNodes; var cloneTrs = node.childNodes; for (var i = 0; i < domTrs.length; i++) {
if (cloneTrs[i] && domTrs[i]) {
var domTds = domTrs[i].childNodes; var cloneTds = cloneTrs[i].childNodes; for (var j = 0; j < domTds.length; j++) {
if ((cloneTds[j]) && (cloneTds[j].style)) {
cloneTds[j].style.width = dojo.style.getContentWidth(domTds[j]) + "px";
}
}
}
}
}
Change History (3)
comment:1 Changed 14 years ago by
Milestone: | → 0.4.1 |
---|---|
Owner: | changed from psowden to alex |
Status: | new → assigned |
comment:2 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [6625]) make DnD work for <tbody> elements as well as <tr> elements. Fixes #1714