client/src/views/application.js
function (ev) {
        // If we're copying text, don't shift focus
        if (ev.ctrlKey || ev.altKey || ev.metaKey) {
            return;
        }

        // If we're typing into an input box somewhere, ignore
        var elements = ['input', 'select', 'textarea', 'button', 'datalist', 'keygen'];
        var do_not_refocus =
            elements.indexOf(ev.target.tagName.toLowerCase()) > -1 ||
            $(ev.target).attr('contenteditable');

        if (do_not_refocus) {
            return;
        }

        $('#kiwi .controlbox .inp').focus();
    }
function (ev) {
        // If we're copying text, don't shift focus
        if (ev.ctrlKey || ev.altKey || ev.metaKey) {
            return;
        }

        // If we're typing into an input box somewhere, ignore
        var elements = ['input', 'select', 'textarea', 'button', 'datalist', 'keygen'];
        var do_not_refocus =
            elements.indexOf(ev.target.tagName.toLowerCase()) > -1 ||
            $(ev.target).attr('contenteditable');

        if (do_not_refocus) {
            return;
        }

        $('#kiwi .controlbox .inp').focus();
    }
function ( ev ) { // If we're copying text, don't shift focus if ( ev . ctrlKey || ev . altKey || ev . metaKey ) { return ; } // If we're typing into an input box somewhere, ignore var elements = [ 'input' , 'select' , 'textarea' , 'button' , 'datalist' , 'keygen' ] ; var do_not_refocus = elements . indexOf ( ev . target . tagName . toLowerCase ( ) ) > - 1 || $ ( ev . target ) . attr ( 'contenteditable' ) ; if ( do_not_refocus ) { return ; } $ ( '#kiwi .controlbox .inp' ) . focus ( ) ; }
Globally shift focus to the command input box on a keypress
Globally shift focus to the command input box on a keypress