Html Code :
<input type="text" id="normal_input" />
<button class="normal_button">Button</button>
Js Code :
$('.normal_button').click(function(e){
console.log(e);
});
The function works good when I click the button
however when I press enter in the input text, it also trigger the button click function.
I solved this by change button element to input button
but I'm still curios about the reason
is it some kind of jquery bug or something is wrong?