Closed Bug 323750 Opened 19 years ago Closed 8 years ago

XUL menus not updated when manipulating the DOM tree

Categories

(Core :: DOM: Core & HTML, defect)

x86
All
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: andreas, Unassigned)

References

Details

(Keywords: regression, testcase)

Attachments

(4 files)

1.87 KB, image/png
Details
73.29 KB, image/png
Details
19.84 KB, application/x-xpinstall
Details
3.63 KB, application/vnd.mozilla.xul+xml
Details
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

I have an extension that manipulates the DOM tree to add/remove menus.
The code worked fine in Firefox 1.0 but in Firefox added menus are not show.

The code from the testcase looks like this:

    var menubar = document.getElementById('menu');

    var newmenu = document.createElement('menu');
    newmenu.setAttribute('id', 'newmenu');
    newmenu.setAttribute('label', 'my new menu');

    menubar.appendChild(newmenu);

    var menupopup = document.createElement('menupopup');
    menupopup.setAttribute('id', 'test');
    var menuitem = document.createElement('menuitem');
    menuitem.setAttribute('id', 'helloworld');
    menuitem.setAttribute('label', 'helloworld');
    menupopup.appendChild(menuitem);
    newmenu.appendChild(menupopup);

I attach two screenshots: one showing the menu of the UI and one showing
the output of the DOM tree. As you can see from the second screenshot there are two menus defined but I can see only one.
I also attach the whole extension as XPI file.
You can start the extension using

   firefox -chrome chrome://idesk/content 

This will open the application as in screenshot 1 and popup a debugging window with the DOM tree.

The behaviour also occurs with the latest night build (Jan 17th, 2005).



Reproducible: Always
Attached image application
Attached image DOM Tree
Attached file idesk XPI
Summary: XUL menus not updated when manipulating the DOM tree → XUL menus not updated when manipulating the DOM tree (Linux, Firefox 1.5)
The error does not seem to occur with Firefox 1.5 on Windows XP but Linux only-
Please attach a simplified testcase (a single XUL file with appropriate script inlined) for the ease of testing. Also if you have time to figure out the regression window, it would be nice.
Assignee: nobody → general
Component: Menus → DOM
Keywords: regression
Product: Firefox → Core
QA Contact: menus → ian
Version: unspecified → Trunk
run it using "firefox1.5 idesk.xul"
I've added a self-containing idesk.xul file.
It should show up one menu "Datei". After two alerts you will see the DOM tree
with two menus but the second one does not show up.

My former notice on Windows was incorrect. The testcase also does not work on Windows.
Thanks for the testcase.

Indeed, the menu is not displayed here on Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 when loading the XUL file in a <browser>. The menu is there, but its size is 0x0 according to DOM inspector.

The testcase works when loaded in its own window.
Keywords: testcase
OS: Linux → All
Summary: XUL menus not updated when manipulating the DOM tree (Linux, Firefox 1.5) → XUL menus not updated when manipulating the DOM tree
Depends on: 279703
Assignee: general → nobody
QA Contact: ian → general
Hi,

I have tested this issue on the latest Firefox release (45.0.1, Build ID 20160315153207) and on the latest Nightly (48.0a1, Build ID 20160328030215) with the testcase from comment 6 and it is no longer reproducible. (for the testcase from comment 6 the Remote XUL Manager addon is needed) I can also confirm that this issue was reproducible on Firefox 1.5.
Considering this I will mark this issue as Resolved-WORKSFORME. If anyone can still reproduce it, feel free to reopen the issue and provide more information.

Thanks,
Cipri
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: