Opened 7 years ago

Closed 6 years ago

#15883 closed defect (invalid)

Menu: dijitMenuItemSelected not removed after new dialog on Menu onclick

Reported by: jkpathan Owned by: bill
Priority: high Milestone: 1.9
Component: Dijit Version: 1.7.3
Keywords: Cc:
Blocked By: Blocking:

Description

This seems to be similar problem to Ticket #10339 from 2009.

I have a simple menu. On a MenuItem? onclick event a new modal Dialog is opened. When the dialog is closed the parent PopupMenuBarItem? still has dijitMenuItemSelected applied to it. If I click a different PopupMenuBarItem? and then re-click the same PopupMenuBarItem? again, the dijitMenuItemSelected style is removed.

This has been tested in the latest Chrome (21.0.1180.83 m), Firefox (13.0.1) and IE9. The problem is exactly the same.

Attachments (1)

dijitMenuItemSelected_Problem.html (1.5 KB) - added by jkpathan 7 years ago.
You will need to update the dojo classes and claro theme css paths

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by jkpathan

You will need to update the dojo classes and claro theme css paths

comment:1 Changed 6 years ago by bill

Priority: undecidedhigh
Summary: dijitMenuItemSelected not removed after new dialog on Menu onclickMenu: dijitMenuItemSelected not removed after new dialog on Menu onclick

comment:2 Changed 6 years ago by bill

Milestone: tbd1.9

comment:3 Changed 6 years ago by bill

Resolution: invalid
Status: newclosed

This looks to be a problem with your test case:

dojo.byId("aboutMenuItem").onclick = function() {

Widgets are not DOMNodes, they are separate objects, so that code is wrong. You need to do:

dijit.byId("aboutMenuItem").onClick = function() {

or in more modern code:

registry.byId("aboutMenuItem").on("click",  function() {

Does that fix the problem?

Note: See TracTickets for help on using tickets.