src/aria/widgets/form/TextInput.js
function (event, avoidCallback) {
            this._hasFocus = true;

            if (!this._keepFocus) {
                var cfg = this._cfg;

                if (cfg.readOnly) {
                    return;
                }

                this.setHelpText(false);
                if (this._isPrefilled) {
                    this.setPrefillText(false);

                    this.checkValue({
                        value : cfg.prefill
                    });
                }
                this.checkValue({
                    stopValueProp : true
                });

                if (this._cfg) {
                    cfg = this._cfg;
                    if (cfg.validationEvent === 'onFocus'
                            && ((cfg.formatError && cfg.formatErrorMessages.length) || (cfg.error && cfg.errorMessages.length))) {
                        this._validationPopupShow();
                    }
                }
                this._updateState();
            } else {
                // restore selection
                var caretPosition = this._currentCaretPosition;
                this._currentCaretPosition = null;
                if (caretPosition) {
                    this.setCaretPosition(caretPosition.start, caretPosition.end);
                }
            }
            if (!!this._cfg.onfocus && !avoidCallback) {
                this.evalCallback(this._cfg.onfocus);
            }

            // on IE9 and IE10, it is necessary to add some delay before being able to set the selection
            ariaCoreTimer.addCallback({
                fn : this._autoselect,
                scope : this,
                delay : 1
            });
        }
function (event, avoidCallback) {
            this._hasFocus = true;

            if (!this._keepFocus) {
                var cfg = this._cfg;

                if (cfg.readOnly) {
                    return;
                }

                this.setHelpText(false);
                if (this._isPrefilled) {
                    this.setPrefillText(false);

                    this.checkValue({
                        value : cfg.prefill
                    });
                }
                this.checkValue({
                    stopValueProp : true
                });

                if (this._cfg) {
                    cfg = this._cfg;
                    if (cfg.validationEvent === 'onFocus'
                            && ((cfg.formatError && cfg.formatErrorMessages.length) || (cfg.error && cfg.errorMessages.length))) {
                        this._validationPopupShow();
                    }
                }
                this._updateState();
            } else {
                // restore selection
                var caretPosition = this._currentCaretPosition;
                this._currentCaretPosition = null;
                if (caretPosition) {
                    this.setCaretPosition(caretPosition.start, caretPosition.end);
                }
            }
            if (!!this._cfg.onfocus && !avoidCallback) {
                this.evalCallback(this._cfg.onfocus);
            }

            // on IE9 and IE10, it is necessary to add some delay before being able to set the selection
            ariaCoreTimer.addCallback({
                fn : this._autoselect,
                scope : this,
                delay : 1
            });
        }
function ( event , avoidCallback ) { this . _hasFocus = true ; if ( ! this . _keepFocus ) { var cfg = this . _cfg ; if ( cfg . readOnly ) { return ; } this . setHelpText ( false ) ; if ( this . _isPrefilled ) { this . setPrefillText ( false ) ; this . checkValue ( { value : cfg . prefill } ) ; } this . checkValue ( { stopValueProp : true } ) ; if ( this . _cfg ) { cfg = this . _cfg ; if ( cfg . validationEvent === 'onFocus' && ( ( cfg . formatError && cfg . formatErrorMessages . length ) || ( cfg . error && cfg . errorMessages . length ) ) ) { this . _validationPopupShow ( ) ; } } this . _updateState ( ) ; } else { // restore selection var caretPosition = this . _currentCaretPosition ; this . _currentCaretPosition = null ; if ( caretPosition ) { this . setCaretPosition ( caretPosition . start , caretPosition . end ) ; } } if ( ! ! this . _cfg . onfocus && ! avoidCallback ) { this . evalCallback ( this . _cfg . onfocus ) ; } // on IE9 and IE10, it is necessary to add some delay before being able to set the selection ariaCoreTimer . addCallback ( { fn : this . _autoselect , scope : this , delay : 1 } ) ; }
DOM callback function called when the focus is put on the input. The onFocus event is available on the input
that sits inside a span. In this function, we change the background on the parent span node, and also the
second span that has the end of the input.
@param {aria.DomEvent} event Focus event
@protected
DOM callback function called when the focus is put on the input . The onFocus event is available on the input that sits inside a span . In this function we change the background on the parent span node and also the second span that has the end of the input .