I recently posted a problem with re-focusing the cursor to a field that had an ''onblur'' event. The browser is FF3 I have found the following link that identifies the problem: https://bugzilla.mozilla.org/show_bug.cgi?id=53579 Does prototype.js have a work-around or does anyone know a work- around? Frank --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
few1938 wrote:> I recently posted a problem with re-focusing the cursor to a field > that had an ''onblur'' event. The browser is FF3 > > I have found the following link that identifies the problem: > https://bugzilla.mozilla.org/show_bug.cgi?id=53579 > > Does prototype.js have a work-around or does anyone know a work- > around? > > Frank >Try putting the focus() inside of a window.setTimeout. So like this: input.observe(''blur'', function() { window.setTimeout(this.focus); }); I didn''t test it but I''ve done things similar to get around the issue. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Watch out for binding/this issues if you''re using this example - this
isn''t
bound inside the event handler:
input.observe(''blur'', function() {
window.setTimeout(function() { Element.focus(input); });
});
-Fred
On Thu, Jul 3, 2008 at 9:31 AM, Trevan Richins
<developer-P5Ep+WoDybrQT0dZR+AlfA@public.gmane.org> wrote:
> Try putting the focus() inside of a window.setTimeout. So like this:
>
> input.observe(''blur'', function() {
> window.setTimeout(this.focus);
> });
>
> I didn''t test it but I''ve done things similar to get
around the issue.
--
Science answers questions; philosophy questions answers.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
The timeout issue has been discussed in the link. Frank On Jul 3, 10:31 am, Trevan Richins <develo...-P5Ep+WoDybrQT0dZR+AlfA@public.gmane.org> wrote:> few1938 wrote: > > I recently posted a problem with re-focusing the cursor to a field > > that had an ''onblur'' event. The browser is FF3 > > > I have found the following link that identifies the problem: > >https://bugzilla.mozilla.org/show_bug.cgi?id=53579 > > > Does prototype.js have a work-around or does anyone know a work- > > around? > > > Frank > > Try putting the focus() inside of a window.setTimeout. So like this: > > input.observe(''blur'', function() { > window.setTimeout(this.focus); > > }); > > I didn''t test it but I''ve done things similar to get around the issue.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---