bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
function(mouseEvent /* optional */) {
			var actionTaken = false;
			if (!this.isVisible()) {
				this.dispatchEvent({type: "triggered", dropdown: this, event: mouseEvent}); //$NON-NLS-0$
				if (this._populate) {
					this.empty();
					this._populate(this._dropdownNode);
				}
				var items = this.getItems();
				if (items.length > 0) {
					lib.setFramesEnabled(false);
					if (this._boundAutoDismiss) {
						lib.removeAutoDismiss(this._boundAutoDismiss);
					} 
					this._boundAutoDismiss = this._autoDismiss.bind(this);

					this._triggerNode.classList.add("dropdownTriggerOpen"); //$NON-NLS-0$
					this._triggerNode.setAttribute("aria-expanded", "true"); //$NON-NLS-1$ //$NON-NLS-0$
					if (this._selectionClass) {
						this._triggerNode.classList.add(this._selectionClass);
					}
					this._dropdownNode.classList.add("dropdownMenuOpen"); //$NON-NLS-0$
					this._isVisible = true;
					
					if (this._dropdownNode.scrollHeight > this._dropdownNode.offsetHeight) {
						this._buttonsAdded = addScrollButtons.call(this);
					}

					// add auto dismiss.  Clicking anywhere but trigger or a submenu item means close.
					var submenuNodes = lib.$$array(".dropdownSubMenu", this._dropdownNode); //$NON-NLS-0$
					var list = [this._triggerNode].concat(submenuNodes);
					if (this._buttonsAdded) {
						list.push(this._topScrollButton);
						list.push(this._bottomScrollButton);
					}
					lib.addAutoDismiss(list, this._boundAutoDismiss);
					this._positionDropdown(mouseEvent);
					
					if (this._buttonsAdded) {
						positionScrollButtons.call(this);
					}					
					
					this._focusDropdownNode();
					actionTaken = true;
					
					if (this._parentDropdown) {
						this._parentDropdown.submenuOpen(this);
					}
					
					if (this._trapTabs) {
						lib.trapTabs(this._dropdownNode);
					}
				}
			}
			return actionTaken;
		}
function(mouseEvent /* optional */) {
			var actionTaken = false;
			if (!this.isVisible()) {
				this.dispatchEvent({type: "triggered", dropdown: this, event: mouseEvent}); //$NON-NLS-0$
				if (this._populate) {
					this.empty();
					this._populate(this._dropdownNode);
				}
				var items = this.getItems();
				if (items.length > 0) {
					lib.setFramesEnabled(false);
					if (this._boundAutoDismiss) {
						lib.removeAutoDismiss(this._boundAutoDismiss);
					} 
					this._boundAutoDismiss = this._autoDismiss.bind(this);

					this._triggerNode.classList.add("dropdownTriggerOpen"); //$NON-NLS-0$
					this._triggerNode.setAttribute("aria-expanded", "true"); //$NON-NLS-1$ //$NON-NLS-0$
					if (this._selectionClass) {
						this._triggerNode.classList.add(this._selectionClass);
					}
					this._dropdownNode.classList.add("dropdownMenuOpen"); //$NON-NLS-0$
					this._isVisible = true;
					
					if (this._dropdownNode.scrollHeight > this._dropdownNode.offsetHeight) {
						this._buttonsAdded = addScrollButtons.call(this);
					}

					// add auto dismiss.  Clicking anywhere but trigger or a submenu item means close.
					var submenuNodes = lib.$$array(".dropdownSubMenu", this._dropdownNode); //$NON-NLS-0$
					var list = [this._triggerNode].concat(submenuNodes);
					if (this._buttonsAdded) {
						list.push(this._topScrollButton);
						list.push(this._bottomScrollButton);
					}
					lib.addAutoDismiss(list, this._boundAutoDismiss);
					this._positionDropdown(mouseEvent);
					
					if (this._buttonsAdded) {
						positionScrollButtons.call(this);
					}					
					
					this._focusDropdownNode();
					actionTaken = true;
					
					if (this._parentDropdown) {
						this._parentDropdown.submenuOpen(this);
					}
					
					if (this._trapTabs) {
						lib.trapTabs(this._dropdownNode);
					}
				}
			}
			return actionTaken;
		}
function ( mouseEvent /* optional */ ) { var actionTaken = false ; if ( ! this . isVisible ( ) ) { this . dispatchEvent ( { type : "triggered" , dropdown : this , event : mouseEvent } ) ; //$NON-NLS-0$ if ( this . _populate ) { this . empty ( ) ; this . _populate ( this . _dropdownNode ) ; } var items = this . getItems ( ) ; if ( items . length > 0 ) { lib . setFramesEnabled ( false ) ; if ( this . _boundAutoDismiss ) { lib . removeAutoDismiss ( this . _boundAutoDismiss ) ; } this . _boundAutoDismiss = this . _autoDismiss . bind ( this ) ; this . _triggerNode . classList . add ( "dropdownTriggerOpen" ) ; //$NON-NLS-0$ this . _triggerNode . setAttribute ( "aria-expanded" , "true" ) ; //$NON-NLS-1$ //$NON-NLS-0$ if ( this . _selectionClass ) { this . _triggerNode . classList . add ( this . _selectionClass ) ; } this . _dropdownNode . classList . add ( "dropdownMenuOpen" ) ; //$NON-NLS-0$ this . _isVisible = true ; if ( this . _dropdownNode . scrollHeight > this . _dropdownNode . offsetHeight ) { this . _buttonsAdded = addScrollButtons . call ( this ) ; } // add auto dismiss.  Clicking anywhere but trigger or a submenu item means close. var submenuNodes = lib . $$array ( ".dropdownSubMenu" , this . _dropdownNode ) ; //$NON-NLS-0$ var list = [ this . _triggerNode ] . concat ( submenuNodes ) ; if ( this . _buttonsAdded ) { list . push ( this . _topScrollButton ) ; list . push ( this . _bottomScrollButton ) ; } lib . addAutoDismiss ( list , this . _boundAutoDismiss ) ; this . _positionDropdown ( mouseEvent ) ; if ( this . _buttonsAdded ) { positionScrollButtons . call ( this ) ; } this . _focusDropdownNode ( ) ; actionTaken = true ; if ( this . _parentDropdown ) { this . _parentDropdown . submenuOpen ( this ) ; } if ( this . _trapTabs ) { lib . trapTabs ( this . _dropdownNode ) ; } } } return actionTaken ; }
Open the dropdown.
Open the dropdown .