Opened 12 years ago
Closed 12 years ago
#9140 closed defect (fixed)
MenuBar: Runtime Error in Menu.js when moving cursor to menu item w/no popup
Reported by: | Yves De Bruyne | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Dijit | Version: | 1.3.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
In the function _openPopup, when hovering over a MenuBarItem, you get an error because the item in question has no 'popup' object.
I solved this locally by adding an additional check
[Menu.js] 162 var popup = from_item.popup; +++ if (!popup) { return; } 164 if(popup.isShowingNow){ return; }
Not sure if this is the right solution or if MenuBarItem is derived from the wrong class...
Attachments (1)
Change History (8)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
I've not been able to reproduce it on the test_Menu.
I've attached a simple version of my code (really tiny). I get a JavaScript? error when I open the "Directories" Submenu, then move to "Web Mail" item.
I've tried this on Firefox 3 and Internet Explorer7.
comment:3 Changed 12 years ago by
OK, thanks for the test case. Not sure if this is the cause of your problem, but why are you adding a MenuBarItem widget to a Menu?
pMetaMenu.addChild(new dijit.MenuBarItem({ ...
That's invalid.
comment:4 Changed 12 years ago by
I'm not sure I do... I reuploaded the file with new variable names to clear up the confusion... I took it almost verbatim out of my project before...
1) Create Menubar 2) Create Submenu 3) Add Item so the submenu
4) Add submenu to the Menubar 5) Add plain item to the menubar
Still stuggling with the docs though... My project has moved to using the parser to instantiate the menu, but I'd like to nail down this error so I can sleep at night :-)
Cheers
comment:5 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Milestone: | tbd → 1.4 |
Owner: | set to bill |
Status: | new → assigned |
Summary: | Runtime Error in Menu.js → Menu: Runtime Error in Menu.js when moving cursor to menu item w/no popup |
Ah OK I see it now.
The problem happens when the user is hovering over a menu item with a sub-menu (that is open), and then the user moves the cursor over a menu item w/out a submenu.
Thanks for the test case and the bug report. I'll fix.
comment:6 Changed 12 years ago by
Summary: | Menu: Runtime Error in Menu.js when moving cursor to menu item w/no popup → MenuBar: Runtime Error in Menu.js when moving cursor to menu item w/no popup |
---|
comment:7 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [17311]) Don't try to automatically open the sub-menu for a MenuBarItem? w/out a sub-menu. Fixes #9140 !strict.
Can you give a test case or steps to reproduce in test_Menu.html?
I've hovered over MenuBarItem's before with no problems.
Which browser?