I have this code http://jsfiddle.net/2Gay9/3/
HTML
<form action="/" method="get" onsubmit="return false";>
test: <input type="text" value="">
<input type="submit" value="submit">
</form>
JS
jQuery('input').bind("keydown click", function(event){
console.log(event.type);
console.log(jQuery(this));
});
Try hit RETURN in input text and look console:
keydown
jQuery(input)
click
jQuery(input submit)
QUESTION: Why browser is triggering a 'click' event on submit button, instead of trigger a 'submit' event in the form? Is this a project flaw or a specification? How can I cancel second event WITHOUT cancel form submission?
Tks
UPDATE In other words, I just need to diferenciate my event from browser event.