Used to show drop downs (ex: the select list of a ComboBox) or popups (ex: right-click context menus).
See the dijit/popup reference documentation for more information.
Z-index of the first popup. (If first popup opens other popups they get a higher z-index.)
Stack of currently popped up widgets. (someone opened _stack[0], and then it opened _stack[1], etc.)
Initialization for widgets that will be used as popups. Puts widget inside a wrapper DIV (if not already in one), and returns pointer to that wrapper DIV.
Parameter | Type | Description |
---|---|---|
widget | Widget |
If screen has been scrolled, reposition all the popups in the stack. Then set timer to check again later.
Close specified popup and any popups that it parented. If no popup is specified, closes all popups.
Parameter | Type | Description |
---|---|---|
popup | Widget |
Optional
|
Compute the closest ancestor popup that's not a child of another popup. Ex: For a TooltipDialog with a button that spawns a tree of menus, find the popup of the button.
Hide this popup widget (until it is ready to be shown). Initialization for widgets that will be used as popups
Also puts widget inside a wrapper DIV (if not already in one)
If popup widget needs to layout it should do so when it is made visible, and popup._onShow() is called.
Parameter | Type | Description |
---|---|---|
widget | Widget |
Moves the popup widget off-screen. Do not use this method to hide popups when not in use, because that will create an accessibility issue: the offscreen popup is still in the tabbing order.
Parameter | Type | Description |
---|---|---|
widget | Widget |
Popup the widget at the specified position
Parameter | Type | Description |
---|---|---|
args | Object | An object with the following properties:
|
opening at the mouse position
popup.open({popup: menuWidget, x: evt.pageX, y: evt.pageY});
opening the widget as a dropdown
popup.open({parent: this, popup: menuWidget, around: this.domNode, onClose: function(){...}});
Note that whatever widget called dijit/popup.open() should also listen to its own _onBlur callback (fired from _base/focus.js) to know that focus has moved somewhere else and thus the popup should be closed.