Opened 11 years ago

Closed 10 years ago

#8954 closed defect (wontfix)

open bottom up menus add/remove menuitems poorly

Reported by: aaronreed Owned by:
Priority: high Milestone: 1.5
Component: Dijit Version: 1.2.3
Keywords: Cc:
Blocked By: Blocking:

Description

I have a DropDownButton? located toward the bottom of the browser viewing area and click it to popup the menu. The menu pops up, rather than down, due to the button location, as expected. However, if, while the menu is open, I add or remove menu items, the menu behaves oddly. If I add menu items, the menu does not grow up, but rather grows down and thus covers the DropDownButton?, making it unusable while the menu is showing. If I repeatedly remove the first menuitem, they disappear from the bottom of the showing menu without repositioning the menu. This makes the menu no-longer connect with the drop-down button.

Attachments (1)

test2.html (3.0 KB) - added by aaronreed 11 years ago.
testcase

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by aaronreed

Attachment: test2.html added

testcase

comment:1 Changed 11 years ago by bill

That's true, there's no infrastructure for the dijit.util.popup() code to detect or handle changes to the size of the menu while it's being displayed.

We might be able to solve most of the problem by just anchoring the menu by specifying style.bottom rather than style.top.

comment:2 Changed 10 years ago by bill

Milestone: tbd1.5

comment:3 Changed 10 years ago by bill

Resolution: wontfix
Status: newclosed

Probably won't fix this, I don't want to complicate the popup code.

I think your workaround should be to call dijit.placeOnScreenAroundElement() to reposition the Menu after you have added items to it.

Note: See TracTickets for help on using tickets.