Opened 14 years ago

Closed 13 years ago

#389 closed defect (fixed)

Menu2 in wrong position inside TabSet

Reported by: dojo@… Owned by: anonymous
Priority: high Milestone:
Component: Widgets Version: 0.2
Keywords: Cc:
Blocked By: Blocking:

Description

When using Menu2 inside a TabPane?, the menu appears in the wrong position.

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
  <html>
      <head>
          <title>A Test Page</title>
          <script type="text/javascript">
              var djConfig = {
                  isDebug: false
              };
          </script>
          <script type="text/javascript" src="dojo/dojo.js"></script>
          <script language="JavaScript" type="text/javascript">
              dojo.require("dojo.widget.TabPane");
              dojo.require("dojo.widget.ContentPane");
              dojo.require("dojo.widget.Menu2");
              dojo.hostenv.writeIncludes();
          </script>
      </head>
      <body>
          <h1>Some Text</h1>
          <div id="mainTabPane" dojoType="TabPane" style="width:
100%; height: 50em;" selectedTab="frontPage">
              <div id="frontPage" dojoType="ContentPane" label="Test Tab">
                  <div dojoType="PopupMenu2" targetNodeIds="test">
                      <div dojoType="MenuItem2" caption="MENU 1"></div>
                  </div>
                  <div id="test" style="background-color:
silver">Right Click Here</div>
              </div>
          </div>
      </body>
  </html>

Change History (3)

comment:1 Changed 14 years ago by bill

Yup. The current only handles the case where the menu is a child of <body>. (As a workaround you can put the menu as a child of <body>.)

comment:2 Changed 13 years ago by anonymous

i have a test case for this in tests/widgets/test_Menu2_Position.html

positioning is broken for menus placed inside relatively or absolutely positioned elements too.

the fix will probably be to move the popup menu node to be a child of the body

comment:3 Changed 13 years ago by cal

Resolution: fixed
Status: newclosed

fixed in r3699

Note: See TracTickets for help on using tickets.