Closed Bug 208554 Opened 22 years ago Closed 22 years ago

menulist.selectedItem.value = undefined before a selection is made

Categories

(Core :: XUL, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: albhard, Assigned: hyatt)

References

()

Details

Attachments

(1 file)

837 bytes, application/vnd.mozilla.xul+xml
Details
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4a; MultiZilla v1.4.0.4A) Gecko/20030325 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4a; MultiZilla v1.4.0.4A) Gecko/20030325 Test case at URL provided has Content-type text/plain. The document loads and the menulist appears to have the first option selected by default. (Indeed this is the case on the Linux platform, possibly others.) If one tries to access the value of the selected item (or simply the value of the first item in the list) 'undefined' is returned. Once a selection has been made either by user input or the 'selected' attribute, behavior is normal. Reproducible: Always Steps to Reproduce:
You can't guarantee that XBL bindings exist for invisible elements. Also, you should be using menulist.value to retrieve the value. Also, you should use <script> in preference to <html:script>.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: shrir → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: