diff --git a/xpfe/global/resources/content/wizardHandlerSet.js b/xpfe/global/resources/content/wizardHandlerSet.js index 2b876c34ce90..8ba0d409d44a 100644 --- a/xpfe/global/resources/content/wizardHandlerSet.js +++ b/xpfe/global/resources/content/wizardHandlerSet.js @@ -153,11 +153,13 @@ function DEF_onPageLoad( tag ) // set the focus to the first focusable element var doc = window.frames[0].document; - var controls = doc.controls; - for (var i=0; i< controls.length; i++) { - if (controls[i].focus) { - controls[i].focus(); - break; // stop when focus has been set + if ("controls" in doc && doc.controls.length > 0) { + var controls = doc.controls; + for (var i=0; i< controls.length; i++) { + if (controls[i].focus) { + controls[i].focus(); + break; // stop when focus has been set + } } } }