code: protected void onClose() {
  
          if ((m_selectedItem != null)) {
              if (m_selectedItem.hasSubmenu()) {
                  m_selectedItem.getSubMenu().onClose();
              }
              m_selectedItem.deselectItem();
          }
          m_popup.hide();
      }
docs: Action on close.<p>
  
  On close all sub menus should be hidden, the currently selected item should be deselected
  and the popup will be closed.<p>