function collapse() {
    if ( _isExpanded && !_isAnimating ) {
      _deferFunct = standardType.noopFunct;
      _isAnimating = true;
      _isExpanded = false;
      this.dispatchEvent( 'collapseBegin',
                          { target: this, type: 'collapseBegin' } );
      if ( _collapseTransitionMethod ) {
        var hasTransition = _collapseTransition &&
                            _collapseTransition.isAnimated();
        if ( hasTransition ) {
          _collapseTransition
            .addEventListener( BaseTransition.END_EVENT, _collapseEndBinded );
        }
        _collapseTransitionMethod
          .apply( _collapseTransition, _collapseTransitionMethodArgs );
        if ( !hasTransition ) {
          _collapseEndBinded();
        }
      } else {
        _collapseEndBinded();
      }

      if ( _altTriggerDom ) {
        _setAriaAttr( 'expanded', _altTriggerDom, false );
      }

      _setAriaAttr( 'expanded', _triggerDom, false );
      _setAriaAttr( 'pressed', _triggerDom, false );
      _setAriaAttr( 'expanded', _contentDom, false );
      // TODO: Remove or uncomment when keyboard navigation is in.
      // _triggerDom.focus();
    } else {
      _deferFunct = _collapseBinded;
    }

    return this;
  }
/**
   * Close the search box.
   * If collapse is called when expand animation is underway,
   * save a deferred call to collapse, which is called when
   * expand completes.
   * @returns {FlyoutMenu} An instance.
   */
Close the search box.
If collapse is called when expand animation is underway,
save a deferred call to collapse, which is called when
expand completes.
@returns {FlyoutMenu} An instance.
Close the search box . If collapse is called when expand animation is underway save a deferred call to collapse which is called when expand completes . @returns { FlyoutMenu } An instance .
function collapse() {
    if ( _isExpanded && !_isAnimating ) {
      _deferFunct = standardType.noopFunct;
      _isAnimating = true;
      _isExpanded = false;
      this.dispatchEvent( 'collapseBegin',
                          { target: this, type: 'collapseBegin' } );
      if ( _collapseTransitionMethod ) {
        var hasTransition = _collapseTransition &&
                            _collapseTransition.isAnimated();
        if ( hasTransition ) {
          _collapseTransition
            .addEventListener( BaseTransition.END_EVENT, _collapseEndBinded );
        }
        _collapseTransitionMethod
          .apply( _collapseTransition, _collapseTransitionMethodArgs );
        if ( !hasTransition ) {
          _collapseEndBinded();
        }
      } else {
        _collapseEndBinded();
      }
      if ( _altTriggerDom ) {
        _setAriaAttr( 'expanded', _altTriggerDom, false );
      }
      _setAriaAttr( 'expanded', _triggerDom, false );
      _setAriaAttr( 'pressed', _triggerDom, false );
      _setAriaAttr( 'expanded', _contentDom, false );
    } else {
      _deferFunct = _collapseBinded;
    }
    return this;
  }
function collapse ( ) { if ( _isExpanded && ! _isAnimating ) { _deferFunct = standardType . noopFunct ; _isAnimating = true ; _isExpanded = false ; this . dispatchEvent ( 'collapseBegin' , { target : this , type : 'collapseBegin' } ) ; if ( _collapseTransitionMethod ) { var hasTransition = _collapseTransition && _collapseTransition . isAnimated ( ) ; if ( hasTransition ) { _collapseTransition . addEventListener ( BaseTransition . END_EVENT , _collapseEndBinded ) ; } _collapseTransitionMethod . apply ( _collapseTransition , _collapseTransitionMethodArgs ) ; if ( ! hasTransition ) { _collapseEndBinded ( ) ; } } else { _collapseEndBinded ( ) ; } if ( _altTriggerDom ) { _setAriaAttr ( 'expanded' , _altTriggerDom , false ) ; } _setAriaAttr ( 'expanded' , _triggerDom , false ) ; _setAriaAttr ( 'pressed' , _triggerDom , false ) ; _setAriaAttr ( 'expanded' , _contentDom , false ) ; } else { _deferFunct = _collapseBinded ; } return this ; }
Close the search box.
Close the search box .
// TODO: Remove or uncomment when keyboard navigation is in. // _triggerDom.focus();