Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#12242 closed defect (fixed)

dijit.form.DropDownButton's menu items show in the top left corner of browser when display is set none

Reported by: Jean-Rubin Leonard Owned by: bill
Priority: high Milestone: 1.6
Component: Dijit - Form Version: 1.6.0b1
Keywords: dijit.form.DropDownButton top left corner css Cc: liucougar
Blocked By: Blocking:

Description (last modified by bill)

When the display attribute of the dijit.form.DropDownButton is initially set to none, and then we set it to display inline to make it show, its menuitems show on the top-left corner of the browser instead of right under the drop down button.

Attachments (1)

testBug.html (2.5 KB) - added by Jean-Rubin Leonard 11 years ago.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by Jean-Rubin Leonard

Attachment: testBug.html added

comment:1 Changed 11 years ago by bill

Cc: liucougar added
Description: modified (diff)
Milestone: tbd1.6
Owner: set to bill
Status: newassigned

Inside of place.js it does:

// get coordinates of aroundNode
aroundNode = dojo.byId(aroundNode);
var oldDisplay =;"";
// #3172: use the slightly tighter border box instead of marginBox
var aroundNodePos = dojo.position(aroundNode, true);;

The aroundNode in this case is your DropDownButton, and setting display to "" causes the button to be hidden due to this CSS in your test file:


So the obvious way to make this work is to not have that CSS.

I can trace the code above back to [4644], apparently it was trying to make the aroundNode visible when it was hidden (although it's having the opposite effect for you), but I'm not sure when the aroundNode would ever be hidden, so I can probably remove that code.

comment:2 Changed 11 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [23717]) Remove code from [4644] trying to make sure aroundNode is visible. The aroundNode is presumably already visible, and the code can actually backfire in a corner case, causing the aroundNode to be hidden (see #12242 test case). Fixes #12242 !strict.

comment:3 Changed 11 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.