KIR
2008-Apr-22 19:42 UTC
Incorrect value for the href link attribute for javascript handlers
Hello, I''ve found that Ajax.InplaceEditor uses # as a href value for the cancel link. I believe this is a mistake, because in MSIE clicking on a link with # in href results in page scrolling to the top of the page. Shouldn''t be the # value replaced with something more safe, like "javascript://" ? Or I''m missing something? Regards, KIR --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Justin Perkins
2008-Apr-22 19:47 UTC
Re: Incorrect value for the href link attribute for javascript handlers
That''s why in the handleFormCancellation method the event.stop() method is called. All browsers will focus the top of the page when you click a link with ''#'' as the HREF, unless the event is prevented from bubbling up. -justin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Walter Lee Davis
2008-Apr-22 19:49 UTC
Re: Incorrect value for the href link attribute for javascript handlers
It should be okay, because the link is cancelled anyway with Event.stop, IIRC. Walter On Apr 22, 2008, at 3:42 PM, KIR wrote:> > Hello, > in MSIE clicking on a link with # in href results in page scrolling > to the top of the page. > > Shouldn''t be the # value replaced with something more safe, like > "javascript://" ? > Or I''m missing something? >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---