src/basis/ui.js
function(select){
        var focusElement = this.tmpl ? this.tmpl.focus || this.element : null;

        if (focusElement)
        {
          if (focusTimer)
            focusTimer = basis.clearImmediate(focusTimer);

          focusTimer = basis.setImmediate(function(){
            try {
              focusElement.focus();
              if (select)
                focusElement.select();
            } catch(e) {}
          });
        }
      }
function(select){
        var focusElement = this.tmpl ? this.tmpl.focus || this.element : null;

        if (focusElement)
        {
          if (focusTimer)
            focusTimer = basis.clearImmediate(focusTimer);

          focusTimer = basis.setImmediate(function(){
            try {
              focusElement.focus();
              if (select)
                focusElement.select();
            } catch(e) {}
          });
        }
      }
function ( select ) { var focusElement = this . tmpl ? this . tmpl . focus || this . element : null ; if ( focusElement ) { if ( focusTimer ) focusTimer = basis . clearImmediate ( focusTimer ) ; focusTimer = basis . setImmediate ( function ( ) { try { focusElement . focus ( ) ; if ( select ) focusElement . select ( ) ; } catch ( e ) { } } ) ; } }
Set focus on element in template, if possible.
@param {boolean=} select
Set focus on element in template if possible .