Just give focus to <input type=text>
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 25 Oct 2001 13:45:04 +0000 (13:45 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 25 Oct 2001 13:45:04 +0000 (13:45 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1613 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/page_header.php

index 9833282..ffe67d3 100644 (file)
@@ -44,7 +44,7 @@
    function displayPageHeader($color, $mailbox) {
       displayHtmlHeader ();
 
-      echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\" onLoad='document.forms[0].elements[0].focus();'>\n\n";
+      echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\" onLoad='if ( document.form[0].elements[0].type == \"text\" ) { document.forms[0].elements[0].focus(); }'>\n\n";
 
       /** Here is the header and wrapping table **/
       $shortBoxName = readShortMailboxName($mailbox, ".");