Closed GoogleCodeExporter closed 9 years ago
In my own ie8 testing, I also do not see the caps-lock warning. However, I
don't see
"Error on page". Where are you seeing that? In the logs, on the browser
display or
is that a javascript error? If so, what are the details on the error?
Original comment by jrivard
on 9 Feb 2010 at 9:47
Well,
it seems that e.target.type is not supported by IE in pwmHelper.js :
e.target.type is null
function checkForCapsLock(e) {
var capsLockWarningElement = getObject('capslockwarning');
if (capsLockWarningElement == null) {
return;
}
var kc = e.keyCode?e.keyCode:e.which;
var sk = e.shiftKey?e.shiftKey:((kc == 16));
if(((kc >= 65 && kc <= 90) && !sk)||((kc >= 97 && kc <= 122) && sk)) {
//if (e.target.type == 'password') {
capsLockWarningElement.style.visibility = 'visible';
//}
} else {
capsLockWarningElement.style.visibility = 'hidden';
}
}
Original comment by jason.br...@gmail.com
on 11 Feb 2010 at 2:26
Changing the function to the following seems to work better in IE, and so far
doesn't
break the other browsers:
function checkForCapsLock(e) {
var capsLockWarningElement = getObject('capslockwarning');
if (capsLockWarningElement == null) {
return;
}
var kc = e.keyCode?e.keyCode:e.which;
var sk = e.shiftKey?e.shiftKey:((kc == 16));
if(((kc >= 65 && kc <= 90) && !sk)||((kc >= 97 && kc <= 122) && sk)) {
if ((e.target != null && e.target.type == 'password') || (e.srcElement !=
null && e.srcElement.type == 'password')) {
capsLockWarningElement.style.visibility = 'visible';
}
} else {
capsLockWarningElement.style.visibility = 'hidden';
}
}
Original comment by jrivard
on 16 Feb 2010 at 5:28
Fix included in b945
Original comment by jrivard
on 1 Jun 2010 at 8:41
Original issue reported on code.google.com by
jason.br...@gmail.com
on 9 Feb 2010 at 9:52