demo/dist/demo.js
function focusFirstMenuItem(pane) {
	    var tabFocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

	    if (this.elements.settings.popup.hidden) {
	      return;
	    }

	    var target = pane;

	    if (!is$1.element(target)) {
	      target = Object.values(this.elements.settings.panels).find(function (pane) {
	        return !pane.hidden;
	      });
	    }

	    var firstItem = target.querySelector('[role^="menuitem"]');
	    setFocus.call(this, firstItem, tabFocus);
	  }
function focusFirstMenuItem(pane) {
	    var tabFocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

	    if (this.elements.settings.popup.hidden) {
	      return;
	    }

	    var target = pane;

	    if (!is$1.element(target)) {
	      target = Object.values(this.elements.settings.panels).find(function (pane) {
	        return !pane.hidden;
	      });
	    }

	    var firstItem = target.querySelector('[role^="menuitem"]');
	    setFocus.call(this, firstItem, tabFocus);
	  }
function focusFirstMenuItem ( pane ) { var tabFocus = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : false ; if ( this . elements . settings . popup . hidden ) { return ; } var target = pane ; if ( ! is$1 . element ( target ) ) { target = Object . values ( this . elements . settings . panels ) . find ( function ( pane ) { return ! pane . hidden ; } ) ; } var firstItem = target . querySelector ( '[role^="menuitem"]' ) ; setFocus . call ( this , firstItem , tabFocus ) ; }
Focus the first menu item in a given (or visible) menu
Focus the first menu item in a given ( or visible ) menu