I subscribe to the squirrelmail-users mailing list. [ ] True - No need to CC me when replying [X] False - Please CC me when replying
This bug occurs when I ...
Access the login-page by a bookmark as described in the "LoggingInQuicker"
tip [1].
The description of the bug:
Focus is set to the "username" field even though this is already filled out.
Focus should be set to the "password" field (it did so in version
1.2.something).
I can reproduce the bug by:
Using a bookmark as described in the "LoggingInQuicker" tip [1].
(Optional) I got bored and found the bug occurs in:
The javascript code, that sets the focus (src/login.php line 73-87).
I believe this behaviour was introduced with the fix described in an
earlier post in squirrelmail-devel? [2]
(Optional) I got really bored and here's a fix:
This is tested in Opera 7.11.
I have removed the textElements variable and added a check to see if the
text-field is empty.
I have attached a diff against src/login.php version 1.106 that I found at
your web-cvs.
But since this is my first ever contribution and I don't really know much
about diff and cvs, you probably should doubblecheck :)
<script language="JavaScript" type="text/javascript">
<!--
function squirrelmail_loginpage_onload() {
document.forms[0].js_autodetect_results.value = '1';
// Sets focus if nonempty text field or password field.
for (i = 0; i < document.forms[0].elements.length; i++) {
if ( document.forms[0].elements[i].type == "text" &&
document.forms[0].elements[i].value == "" ||
document.forms[0].elements[i].type == "password") {
document.forms[0].elements[i].focus();
break;
}
}
}
// -->
</script>
Rasmus K. Jakobsen.
[1] http://www.squirrelmail.org/wiki/en_US/LoggingInQuicker
[2] http://marc.theaimsgroup.com/?l=squirrelmail-devel&m=104401319526011&w=2
----------------------------------------------
My browser information:
Opera/7.11 (Windows 98; U) [da]
get_browser() information (List)
* Nothing listed
My web server information:
PHP Version 4.2.3
PHP Extensions (List)
* 0 = yp
* 1 = sysvshm
* 2 = sysvsem
* 3 = standard
* 4 = sockets
* 5 = session
* 6 = recode
* 7 = posix
* 8 = pcre
* 9 = openssl
* 10 = iconv
* 11 = gettext
* 12 = ftp
* 13 = dio
* 14 = ctype
* 15 = calendar
* 16 = bcmath
* 17 = zlib
* 18 = domxml
* 19 = pgsql
* 20 = mcrypt
* 21 = mhash
* 22 = mysql
* 23 = apache
SquirrelMail-specific information:
Version: 1.4.2
Plugins (List)
* 0 = abook_take
* 1 = administrator
* 2 = delete_move_next
* 3 = filters
* 4 = fortune
* 5 = info
* 6 = listcommands
* 7 = mail_fetch
* 8 = message_details
* 9 = newmail
* 10 = sent_subfolders
* 11 = squirrelspell
* 12 = translate
* 13 = bug_report
* 14 = calendar
My IMAP server information:
Server type: other
Server info: * OK [HIDDEN] IMAP4rev1 UIDPLUS CHILDREN NAMESPACE
THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE STARTTLS]
Courier-IMAP ready. Copyright 1998-2003 Double Precision, Inc. See
COPYING for distribution information.
Cabailities: IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT
THREAD=REFERENCES SORT QUOTA IDLE STARTTLS
login-javascript.diff
Description: Binary data
