public/javascripts/yui/container/container.js
function (type, args, obj) {

            var aButtons = this.cfg.getProperty("buttons"),
                el = this.lastFormElement;

            if (args && args[1]) {
                Event.stopEvent(args[1]);
            }

            if (aButtons && Lang.isArray(aButtons)) {
                this.focusLastButton();
            } else {
                if (el) {
                    try {
                        el.focus();
                    } catch(oException) {
                        // Ignore
                    }
                }
            }
        }
function (type, args, obj) {

            var aButtons = this.cfg.getProperty("buttons"),
                el = this.lastFormElement;

            if (args && args[1]) {
                Event.stopEvent(args[1]);
            }

            if (aButtons && Lang.isArray(aButtons)) {
                this.focusLastButton();
            } else {
                if (el) {
                    try {
                        el.focus();
                    } catch(oException) {
                        // Ignore
                    }
                }
            }
        }
function ( type , args , obj ) { var aButtons = this . cfg . getProperty ( "buttons" ) , el = this . lastFormElement ; if ( args && args [ 1 ] ) { Event . stopEvent ( args [ 1 ] ) ; } if ( aButtons && Lang . isArray ( aButtons ) ) { this . focusLastButton ( ) ; } else { if ( el ) { try { el . focus ( ) ; } catch ( oException ) { // Ignore } } } }
Sets focus to the last element in the Dialog's form or the last
button defined via the "buttons" configuration property.
@method focusLast
Sets focus to the last element in the Dialog s form or the last button defined via the buttons configuration property .