Try adding Protaculous defer or delay to the second call, just to give the browser a moment to acknowledge that the newly shown element is really there.

Form.focusFirstElement.delay(0.1,'my-form');

something like that...

Walter

On Sep 22, 2010, at 10:50 AM, Kupido wrote:

Hi Walter,
your method works fine with Scriptaculous effects, but I keep having
the same problem with the following code:

$('my-form').show(); // not appear, just display
$('my-form').focusFirstElement();

The second function seems to be called when the form is still hidden,
so the field doesn't get focused... this is just an example of what I
mean, I can post more examples if you need, even with more than two
functions.

Thanks again for your help.

--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com . To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en .


--
You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to