Opened 14 years ago

Closed 14 years ago

#6483 closed defect (fixed)

[patch][cla]insertIndex in AccordionPane differences in IE vs FF

Reported by: guest Owned by: bill
Priority: high Milestone: 1.2
Component: Dijit Version: 1.1.0
Keywords: insertIndex AccordionPane Cc:
Blocked By: Blocking:


When using addChild and an insertIndex to insert a programmatically created AccordionPane?, IE apparently starts counting the first pane as Index 1 whereas FF counts it as Index 0, therefore inserting the new pane at different places within the Container. Please see attached to watch this in action.

Attachments (1)

programmatic_accordionpanes.html (2.0 KB) - added by guest 14 years ago.
html file demonstrating bug

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by guest

html file demonstrating bug

comment:1 Changed 14 years ago by bill

Milestone: 1.2
Owner: set to Adam Peller

Adam, can you handle? I suspect this is a problem with dojo core but need to investigate to find out for certain.

comment:2 Changed 14 years ago by Adam Peller

Owner: changed from Adam Peller to bill
Summary: insertIndex in AccordionPane differences in IE vs FF[patch][cla]insertIndex in AccordionPane differences in IE vs FF

someone will have to explain the whole case normalization thing to me. This patch fixes it, but I'm not sure if it's supposed to be case-sensitive this way:

Index: dijit/_Container.js
--- dijit/_Container.js	(revision 13731)
+++ dijit/_Container.js	(working copy)
@@ -92,7 +92,7 @@
 			var refNode = this.containerNode;
 			if(insertIndex && typeof insertIndex == "number"){
-				var children = dojo.query("> [widgetid]", refNode);
+				var children = dojo.query("> [widgetId]", refNode);
 				if(children && children.length >= insertIndex){
 					refNode = children[insertIndex-1]; insertIndex = "after";

the query only returns a valid list using "widgetId"

comment:3 Changed 14 years ago by bill

Status: newassigned

Great... I'll check in the patch. IIRC the rule is that you should use the same case in dojo.query() that you used when creating the attribute in the first place, but I'm not an expert.

comment:4 Changed 14 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [13756]) IE is case sensitive, so need to pass correct case to dojo.query(). Fix from Adam. Fixes #6483. !strict

Note: See TracTickets for help on using tickets.