Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#9662 closed defect (fixed)

NodeList - wrapAll fails

Reported by: Les Owned by: anonymous
Priority: high Milestone: 1.4
Component: General Version: 1.3.2
Keywords: NodeList wrapAll Cc:
Blocked By: Blocking:

Description

Steps:

http://archive.dojotoolkit.org/nightly/dojotoolkit/dojo/tests/NodeList-manipulate.html

Run in Firebug

dojo.require("dojo.NodeList-traverse");
var div = dojo.create('div', {class: 'myClass'});
dojo.query('#inputForm').children('select').wrapAll(div).end()
.children('input').wrapAll(div);
dojo.query('.myClass')

You will see that the DOM is mangled. The last dojo.query('.myClass') should return two elements, but only one is returned.

The following works fine, though:

dojo.require("dojo.NodeList-traverse");
var wrap = '<div class="myClass"></div>'
dojo.query('#inputForm').children('select').wrapAll(wrap).end()
.children('input').wrapAll(wrap);
dojo.query('.myClass')

Change History (2)

comment:1 Changed 10 years ago by James Burke

Resolution: fixed
Status: newclosed

(In [19535]) Fixes #9662, a bug with wrapAll.

comment:2 Changed 10 years ago by bill

Milestone: tbd1.4
Note: See TracTickets for help on using tickets.