const DropdownEventHandler = brackets.getModule("utils/DropdownEventHandler")Kind: global class
Object to handle events for a dropdown list.
DropdownEventHandler handles these events:
Mouse:
- click - execute selection callback and dismiss list
- mouseover - highlight item
- mouseleave - remove mouse highlighting
Keyboard:
- Enter - execute selection callback and dismiss list
- Esc - dismiss list
- Up/Down - change selection
- PageUp/Down - change selection
Items whose "a" has the .disabled class do not respond to selection.
| Param | Type | Description |
|---|---|---|
| $list | jQueryObject |
associated list object |
| selectionCallback | function |
function called when list item is selected. |
| closeCallback | function |
function called when list item is selected. |
| keyDownCallback | function |
function called when list item is selected. |
Public open method
Kind: instance method of DropdownEventHandler
Public close method
Kind: instance method of DropdownEventHandler
Re-register mouse event handlers
Kind: instance method of DropdownEventHandler
| Param | Type | Description |
|---|---|---|
| $list | jQueryObject |
newly updated list object |