Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#820 closed defect (fixed)

if MenuItem2 is created after the menubar has been used, popupmenu2 css is not ok on FF

Reported by: markb@… Owned by: bill
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

Full example follows. Click 'Bookmarks' -> 'Add..', and type a name. The new bookmark (MenuItem2) is added under the 'Bookmarks' submenu, but the CSS for the item is incorrect:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
 <head>
  <script src='dojo.js' type='text/javascript'></script>
  <script language='javascript'>
  dojo.require('dojo.widget.Menu2');
  var bookmarkCount = 1;
  
  function addBookmark() {
	var bookMark = prompt( 'Bookmark Name:', 'testName' );
	
	if ( bookMark ) {
	    var submenu = dojo.widget.byId( 'submenu1' );
	    var newItem = dojo.widget.createWidget( "MenuItem2", { id: 'menuitem_1_' + ( ++bookmarkCount ), caption: bookMark } );
	    submenu.addChild( newItem );
            //submenu.layoutMenu(); // Fixes Safari, but not FF
	}
  }
  </script>
 </head>
 <body>
   <div dojoType='MenuBar2' id='menubar_1'>
    <div dojoType='MenuBarItem2' id='menuitem_1' submenuId='submenu1' caption='Bookmarks'></div>
   </div>
   <div dojoType='PopupMenu2' widgetId='submenu1'>
    <div dojoType='MenuItem2' id='menuitem_1_1' onClick='addBookmark(); return false;' caption='Add...'></div>
   </div>
 </body>
</html>

Change History (4)

comment:1 Changed 13 years ago by dylan

Milestone: 0.5

comment:2 Changed 13 years ago by bill

Milestone: 0.50.4
Owner: changed from anonymous to bill

I tried this in FF; it is already fixed due to the Menu2 rewrite.

comment:3 Changed 13 years ago by bill

Resolution: fixed
Status: newclosed

comment:4 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.