Closed Bug 269240 Opened 20 years ago Closed 20 years ago

dynamically added xul elements have strange js behavior

Categories

(Core :: XUL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: sean, Unassigned)

Details

Attachments

(4 files, 2 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

After adding a listbox to a document, the listbox displays and UI works fine.
However, accessing listbox properties like .selectedItem via js does not work.

Reproducible: Always
Steps to Reproduce:
1. generate a documentFragment that includes a valid listbox with listitems
2. .appendChild the documentFragment into an existing document
3. select one of the list items
4. trigger an event to access the listbox.selectedItem

Actual Results:  
listbox.selectedItem is null

Expected Results:  
listbox.selectedItem should be a listitem object


My attachements rely on a foreign xml datasource, so they're not the best
testcase. But I'll include them anyway for reference.
Attached file Generates dynamic xul (obsolete) —
requires main.xbl, main.css and a foreign xml datasource.
Attached file More buzilla friendly? (obsolete) —
** may crash mozilla **
Attachment #165605 - Attachment is obsolete: true
Attachment #165614 - Attachment is obsolete: true
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: