Ticket #4874 (reopened defect)

Opened 8 months ago

Last modified 6 weeks ago

Menu: must hide menu with style="display: none"; indirectly via a class doesn'twork

Reported by: guest Owned by:
Priority: low Milestone: 1.3
Component: Dijit Version: 0.9
Severity: minor Keywords:
Cc:

Description (last modified by bill) (diff)

If you create a menu but initially hide it via a CSS rule like:

 .menu1 {
      display:none;
}

rather than

style="display: none"
}}

Then it doesn't display when the user right-clicks.

Attachments

dijitTestMenuItem.html (2.1 kB) - added by guest 8 months ago.
Use this file - it demonstrates the problem more clearly.

Change History

Changed 8 months ago by guest

Use this file - it demonstrates the problem more clearly.

Changed 8 months ago by bill

  • severity changed from major to minor

If you do

menu.domNode.style.display="none";

rather than doing it indirectly through a class, then it works, right?

I don't think this has anything to do with programmatic creation but rather just with the (unfortunately undocumented) way that you have to initially hide the element.

Changed 8 months ago by bill

  • status changed from new to closed
  • resolution set to wontfix
  • milestone set to 2.0

Changed 8 months ago by guest

  • status changed from closed to reopened
  • resolution deleted

Well thanks for the this info. However, where is the documentation on how to do this? Also - in some cases you can do dojo.addClass(some.domNode, "someClass") and in some cases not. This speaks directly to consistency in the programming model. And this is actually what concerns me the most. There must be a consistent way to build and wire up widgets. Specific ways for building each widget indicates an inconsistency in the programming model. And this in turn speaks to immaturity of design and/or implementation. That is the real problem. What has been provided here is a workaround, not a fix.

Changed 8 months ago by bill

Documentation for programmatic creation is just the test files themselves. Maybe someday it'll be in the actual documentation on the website. I'll leave this bug open for now, to make sure it's documented.

Changed 8 months ago by bill

  • priority changed from high to low

Changed 7 months ago by bill

  • summary changed from A Menu built programmatically does not display menu items to Menu: must hide menu with style="display: none"; indirectly via a class doesn'twork

Changed 5 months ago by alex

  • milestone changed from 2.0 to 1.3

Milestone 2.0 deleted

Changed 6 weeks ago by bill

  • description modified (diff)

Dijit code might be able to use s CSS class w/!important to hide/show menu (and other widgets like Dialog), rather than setting style on the node indirectly.

Changed 6 weeks ago by bill

  • description modified (diff)
Note: See TracTickets for help on using tickets.