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 98332826444c044f125f85611a5a08e0ea8d56e2..ffe67d3a3cb1115867cce89f200e64f3292f8bf0 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, ".");