Closed Bug 443155 Opened 17 years ago Closed 2 years ago

Panel around menulist breaks selectedIndex (and all other menulist -> menuitem connections)

Categories

(Core :: XUL, defect)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: n.auburger, Unassigned)

References

Details

(Keywords: regression, testcase)

Attachments

(2 files)

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; InfoPath.2) Build Identifier: Xulrunner 1.9(.0.1) Placing a menulist within a panel element breaks all menulist functionality concerning the interaction between the menulist and its menuitems. Setting selectedIndex or selectedItem has no effect, and the contains(), getIndexOfItem(), getItemAtIndex(), insertItemAt(), removeAllItems() and removeItemAt() methods are undefined. Seemingly the panel element breaks associations between menulist and menuitems. Reproducible: Always Actual Results: Setting selectedIndex results in an empty (closed) menulist, but when opened, the items are present.
Attached file Testcase illustrating the problem (deleted) —
This testcase shows the results of the exact same code for two menulists, one directly in the window and one in a panel element.
Just tested the problem by replacing the panel for popup and menupopup elements, but the effect is the same.
Attached image screenshot test (deleted) —
If this attached screenshot is the desired result, then this bug is a regression and caused by Bug 394887.
Blocks: 394887
Version: unspecified → Trunk
I suppose bug 394887 needs to be reopened then?
No, it doesn't need to be reopened. Filing this new bug about the problem is the right thing to do.
Is there some kind of temporary workaround? We pretty much need this functionality in our project. Setting the sizetopopup property on the menulist, which should make the popup construct immediately, doesn't seem to change anything. Neither does the type attribute on the menupopup, which is also mentioned in the fix for bug 394887.
I just tried to run the testcase using a customly compiled xulrunner. I disabled the isLeaf() function forcing it to return false all the time. It doesn't have any impact on this bug. Rian Klaassen: What exactly should i change in the code in order to get the result you are having in your screenshot?
(In reply to comment #7) It is not a fix but a screenshot how it looked in an older build before Bug 394887 was checked in which caused the regression.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: XP Toolkit/Widgets: Menus → XUL
QA Contact: xptoolkit.menus → xptoolkit.widgets
Quite likely because xbl isn't being applied because there's no frame for the menulist, or no widget, or somesuch. We have various bugs on related issues. The workaround is to use <panel type="created"> (the value of the type attribute doesn't actually matter).
Neil, I have the same problem by writing a Mozmill test for adding a RSS feed Smoketest. When you open the feed preview (e.g. http://feeds.delicious.com/v2/rss/recent?min=2&count=15) the available menulist which lets the user choose how to handle the feed cannot be modified because the whole page is inside a panel. Is there a way we can automated this without waiting for a fix on this bug?
Blocks: 499782
QA Whiteboard: qa-not-actionable

In the process of migrating remaining bugs to the new severity system, the severity for this bug cannot be automatically determined. Please retriage this bug using the new severity system.

Severity: major → --

This was fixed long ago.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: