Prevent scope error when using timeout with setfocus in textbox, fix by neil@parkwaycc.co.uk, b=125346, r=cmanske, sr=kin

This commit is contained in:
cmanske%netscape.com 2002-02-16 02:27:29 +00:00
parent 5aa65e3ac5
commit a48a59354d

View File

@ -220,7 +220,8 @@ function SetTextboxFocus(textbox)
{
// Until .select works for editable menulist, lets just set focus
//XXX Using the setTimeout is hacky workaround for bug 103197
setTimeout("textbox.focus()", 1);
// Must create a new function to keep "textbox" in scope
setTimeout( function(textbox) { textbox.focus(); }, 0, textbox );
/*
// Select entire contents
if (textbox.value.length > 0)