Opened 10 years ago

Closed 10 years ago

#8478 closed defect (fixed)

AccordionContainer: messing up (one time of display bug)

Reported by: helloworld Owned by:
Priority: high Milestone: 1.3
Component: Dijit Version: 1.2.2
Keywords: accordionContainer, addchild removechild Cc:
Blocked By: Blocking:

Description (last modified by bill)

hi,

I encounter some issues in my real application, in order to simplify it I write a testcase with almost same logic. the issues of this testcase is:

1.after all loaded, two titles of accordionPane are with bold font, means two panes are selected at current time.

2.when you click add button, the sx pane has been added, but yz pane disppeared. only after you click some other panes, then yz pane can appear.

3.then, you click(select) the sx pane, then click del button, then click add button, then sx pane is messing up, and yz pane disppeared.

my real application with similar logic, but with some different issues :-(

  1. the same issue with issue2 above.

in fact, in the test case, if we change the order of statements of add.

	dijit.byId("frameId").selectChild(dijit.byId("ad"));
        dijit.byId("frameId").addChild(ap4self,4);

to:

	dijit.byId("frameId").addChild(ap4self,4);
	dijit.byId("frameId").selectChild(dijit.byId("ad"));

then issue 2 doesn't exist. but still be here in my real application.

and I also think the order of statements should not make different results.

2.when I deleted the sx pane, there is a blank pane after the last pane, ie the yz pane. if you click other pane title, then this blank pane title disppear, means seem it's OK now.

different scenarios with different results. :-(

Thanks in advance.

Attachments (4)

accordion.html (2.5 KB) - added by bill 10 years ago.
test case
ok.jpg (48.4 KB) - added by helloworld 10 years ago.
the display should be.
wrong.jpg (56.0 KB) - added by helloworld 10 years ago.
the wrong display for the test senario.
test.html (2.1 KB) - added by helloworld 10 years ago.
the test case file

Download all attachments as: .zip

Change History (10)

Changed 10 years ago by bill

Attachment: accordion.html added

test case

comment:1 Changed 10 years ago by bill

Component: GeneralDijit
Description: modified (diff)
Owner: anonymous deleted
Priority: highnormal
Summary: messing up accordionContainer(one time of display bug)AccordionContainer: messing up (one time of display bug)

Thanks for the test case. (I've attached it rather than inlining it as per our convention).

I reproduced the problem about 2 panes being initially selected against 1.2, but it's working in trunk.

As for "yz" disappearing when you press the "add" button, I cannot reproduce that.

Anyway, can you try against trunk (you can download from nightly.dojotoolkit.org) to see if that fixes some/all of your problems?

comment:2 Changed 10 years ago by bill

Milestone: tbd1.3
Resolution: fixed
Status: newclosed

Let us know if there is still a problem on trunk.

comment:3 in reply to:  2 ; Changed 10 years ago by helloworld

Resolution: fixed
Status: closedreopened

Replying to bill:

Let us know if there is still a problem on trunk.

sorry for the late reply.

seems better.

But if you

  1. click the add button to add a new pane.
  2. select the new adding pane.
  3. delete the new adding pane.(I mean del the selected pane currently, ie the new adding pane)
  4. click the add button again.
  5. then display is wrong.

I will attache the ok.jpg and wrong.jpg as example.

Changed 10 years ago by helloworld

Attachment: ok.jpg added

the display should be.

Changed 10 years ago by helloworld

Attachment: wrong.jpg added

the wrong display for the test senario.

comment:4 in reply to:  3 Changed 10 years ago by helloworld

Replying to helloworld:

Replying to bill:

Let us know if there is still a problem on trunk.

sorry for the late reply.

seems better.

But if you

  1. click the add button to add a new pane.
  2. select the new adding pane.
  3. delete the new adding pane.(I mean del the selected pane currently, ie the new adding pane)
  4. click the add button again.
  5. then display is wrong.

I will attache the ok.jpg and wrong.jpg as example.

some comments:

  1. trunk is dojo-2009-02-04.tar.gz from http://archive.dojotoolkit.org/nightly/
  1. IE6 and FF3 for test env.

and attache my test case again for reference.

Changed 10 years ago by helloworld

Attachment: test.html added

the test case file

comment:5 Changed 10 years ago by bill

Ah OK, I see the bug. The child is getting both the dijitVisible and dijitHidden flag at the same time, will fix.

comment:6 Changed 10 years ago by bill

Resolution: fixed
Status: reopenedclosed

(In [16557]) Fixes #8478: if a StackContainer? child is selected, then deleted, then readded, it will have both the dijitVisible and dijitHidden CSS classes applied.

Still unclear what should happen when I remove the child; I guess both CSS classes should be removed? For now just put a safeguard in _setupChild().

!strict.

Note: See TracTickets for help on using tickets.