If the user presses the return key on an autocompletion list to  
select an item, the text field is updated just fine on Firefox and  
IE, but it also triggers form submit on Safari. You normally don't  
want that submit. Looks like in Safari the srcElement of the  
onkeypress event is the text field itself, and see no way to  
distinguish the return in the completion list from a return in the  
text field (which is OK to submit the form).

A possible workaround to this is to intercept the return key  
completely (and this prevent the user from submitting the form  
pressing return in the text field), is there a better solution?

-- fxn


--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to