--- thickbox.js Thu Nov 06 19:53:18 2008
+++ thickbox.js Tue Mar 10 13:40:36 2009
@@ -231,7 +231,8 @@
else { // not an iframe, ajax
if ($('#TB_window').css('display') != 'block') {
if (params['modal'] != 'true') { //ajax no modal
- $('#TB_window').append('
');
+ $('#TB_window').append('');
+ window.setTimeout("tb_focusFirstFormElement()", 1000);
}
else { //ajax modal
$('#TB_overlay').unbind();
@@ -302,6 +303,12 @@
}
//helper functions below
+function tb_focusFirstFormElement() {
+ if(typeof document.forms[0].elements[0] != 'undefined')
+ document.forms[0].elements[0].focus();
+}
+
function tb_showIframe() {
$('#TB_load').remove();
$('#TB_window').css({display:'block', opacity: 0}).animate({opacity: 1}, 400);