function _sakaiReturnFocusBack()
{
  setTimeout(
   function(){
    if (document.forms.length > 0)
    {
      var allElements = document.forms[0];
      for (i = 0; i < allElements.length; i++)
      {
        if((allElements.elements[i].getAttribute("type") !=null) &&((allElements.elements[i].type == "text") || (allElements.elements[i].type == "textarea")))
        {
          document.forms[0].elements[i].focus();
          break;
        }
      }
     }
   }, 600);

}
/**
* Moved code out of renderer.
*
* Jira bug#:SAK-126 returning focus back to first editable field on the web page.
*/
Moved code out of renderer.
Jira bug#:SAK-126 returning focus back to first editable field on the web page.
Moved code out of renderer . Jira bug# : SAK - 126 returning focus back to first editable field on the web page .
function _sakaiReturnFocusBack()
{
  setTimeout(
   function(){
    if (document.forms.length > 0)
    {
      var allElements = document.forms[0];
      for (i = 0; i < allElements.length; i++)
      {
        if((allElements.elements[i].getAttribute("type") !=null) &&((allElements.elements[i].type == "text") || (allElements.elements[i].type == "textarea")))
        {
          document.forms[0].elements[i].focus();
          break;
        }
      }
     }
   }, 600);
}
function _sakaiReturnFocusBack ( ) { setTimeout ( function ( ) { if ( document . forms . length > 0 ) { var allElements = document . forms [ 0 ] ; for ( i = 0 ; i < allElements . length ; i ++ ) { if ( ( allElements . elements [ i ] . getAttribute ( "type" ) != null ) && ( ( allElements . elements [ i ] . type == "text" ) || ( allElements . elements [ i ] . type == "textarea" ) ) ) { document . forms [ 0 ] . elements [ i ] . focus ( ) ; break ; } } } } , 600 ) ; }
Moved code out of renderer.
Moved code out of renderer .