vendor/uui/js/u-ui.js
function (evt) {
        if (this.element && this._container && this.for_element) {
            var items = this.element.querySelectorAll('.u-menu-item:not([disabled])');

            if (items && items.length > 0 && u.hasClass(this._container, 'is-visible')) {
                if (evt.keyCode === this._Keycodes.UP_ARROW) {
                    u.stopEvent(evt);
                    // evt.preventDefault();
                    items[items.length - 1].focus();
                } else if (evt.keyCode === this._Keycodes.DOWN_ARROW) {
                    u.stopEvent(evt);
                    // evt.preventDefault();
                    items[0].focus();
                }
            }
        }
    }
function (evt) {
        if (this.element && this._container && this.for_element) {
            var items = this.element.querySelectorAll('.u-menu-item:not([disabled])');

            if (items && items.length > 0 && u.hasClass(this._container, 'is-visible')) {
                if (evt.keyCode === this._Keycodes.UP_ARROW) {
                    u.stopEvent(evt);
                    // evt.preventDefault();
                    items[items.length - 1].focus();
                } else if (evt.keyCode === this._Keycodes.DOWN_ARROW) {
                    u.stopEvent(evt);
                    // evt.preventDefault();
                    items[0].focus();
                }
            }
        }
    }
function ( evt ) { if ( this . element && this . _container && this . for_element ) { var items = this . element . querySelectorAll ( '.u-menu-item:not([disabled])' ) ; if ( items && items . length > 0 && u . hasClass ( this . _container , 'is-visible' ) ) { if ( evt . keyCode === this . _Keycodes . UP_ARROW ) { u . stopEvent ( evt ) ; // evt.preventDefault(); items [ items . length - 1 ] . focus ( ) ; } else if ( evt . keyCode === this . _Keycodes . DOWN_ARROW ) { u . stopEvent ( evt ) ; // evt.preventDefault(); items [ 0 ] . focus ( ) ; } } } }
Handles a keyboard event on the "for" element.

@param {Event} evt The event that fired.
@private
Handles a keyboard event on the for element .