mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
bug 301471 - error pages should have 'Try Again' button focused. r=biesi sr=bz
This commit is contained in:
parent
b619d6d2a3
commit
18479a3e21
@ -158,6 +158,16 @@
|
||||
var ld = document.getElementById("errorLongDesc");
|
||||
if (ld)
|
||||
ld.innerHTML = parseFakeTags(errorDesc[err]);
|
||||
|
||||
// Focus the Try Again button. We can't just do this inline because of
|
||||
// bug 232004. We can't use onload (see comment below). Since the
|
||||
// <script> that calls initPage is the last DOM node in the document,
|
||||
// a setTimeout of 0 should work.
|
||||
setTimeout(function(){
|
||||
var tryAgainButton = document.getElementById("errorTryAgain");
|
||||
if (tryAgainButton)
|
||||
tryAgainButton.focus();
|
||||
}, 0);
|
||||
}
|
||||
]]></script>
|
||||
</head>
|
||||
|
Loading…
Reference in New Issue
Block a user