Open Bug 390724 Opened 17 years ago Updated 2 years ago

deck.selectedPanel usage broken in prefwindow

Categories

(Toolkit :: XUL Widgets, defect)

defect

Tracking

()

People

(Reporter: mnyromyr, Unassigned)

Details

The prefwindow binding contains the following deck: <xul:deck anonid="paneDeck" flex="1"> <children includes="prefpane"/> </xul:deck> Since the prefpanes aren't real child nodes of the deck, deck.childNodes.length is 0 and deck.selectedPanel will error out in deck.selectedPanel here <http://mxr-test.landfill.bugzilla.org/seamonkey/source/xpfe/global/resources/content/bindings/general.xml#335>: return this.childNodes[this.selectedIndex]; (prefwindow users can work around the issue by accessing the prefwindow.preferencePanes array directly.)
selectedPanel will also give incorrect results if any panel is hidden.
As a workaround I iterate through the sibling nodes. Works perfectly for our Mozmill tests.
OS: Mac OS X → All
Hardware: PowerPC → All
(In reply to neil@parkwaycc.co.uk from comment #1) > selectedPanel will also give incorrect results if any panel is hidden. What's more, using it as a setter will also do the wrong thing in that case. Sigh.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.