That was it Alex. Your suggestion worked. Thanks
Bob --- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote: > > Sounds like a timing issue. When the modal dialog goes away, the focus > managers try to restore focus to the object that last had focus before > the modal dialog appeared. This is probably happening after your call > to setFocus, thus negating its effect. > > First thing to try is to use callLater(focusManager.setFocus, [ > recipeName ]); > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of bobklhr > Sent: Friday, August 24, 2007 11:29 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] setFocus stopped working > > > > I have a button which calls a function which creates a new object and > sets the focus on a field, e.g. > > focusManager.setFocus(recipeName); > > This works fine. > > I recently changed this so that the button would now open a modal > dialog to collect some information and then call the original > function. Now the the focus goes to the button, not the field! > > Any idea what's going wrong and how I can fix it? > > Thanks > > Bob >