javascript MDL-20662 Commited patch to fix old_onload_focus, thanks Nigel for the patch :)
This commit is contained in:
@@ -1162,7 +1162,7 @@ function focuscontrol(controlid) {
|
||||
* This function should be removed as soon as it is no longer used
|
||||
*/
|
||||
function old_onload_focus(formid, controlname) {
|
||||
if (document.forms[formid]) {
|
||||
if (document.forms[formid] && document.forms[formid].elements && document.forms[formid].elements[controlname]) {
|
||||
document.forms[formid].elements[controlname].focus();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user