I have a form with some common fields like "email". I have javascript that catches the return key (13) and submits the form, but the same effect was observed when using the defaultButton property on the host panel.
If the user is on IE and is typing his email address, then selects an item from the browser's inline autocomplete by pressing ENTER, no keypress is sent to Javascript. GOOD.
On Firefox however, the textbox receives the ENTER keypress and wants to submit the form, which is not complete.
Does anyone know how to stop this other than disabling autocomplete? I can't figure out a way to detect that the keypress is actually originating from the auto complete listbox.
I'm using asp.net and jQuery.
Edit - to clarify: Pressing enter on an item in autocomplete should NOT submit the form. The IE behavior is correct (for once!).
My event handler in itself is simply:
on key up (tried keypress too) - if(e.which == 13) submitForm();
Problem is, I don't know how to detect that the ENTER press actually came from the autocomplete control