Closed davidbauer closed 11 years ago
I would add a submit listener to the form instead of a click listener to the button. Then it doesn't matter how the form is submitted (click or enter or whatever).
Old:
$("#searchform #user").keyup(function(event){
if(event.keyCode == 13){
$("#searchform button.linkinput").click();
}
});
$('.linkinput').click (function(e) {
e.preventDefault();
// do stuff
});
New:
$("#searchform").on('submit', function(event) {
event.preventDefault();
// do stuff
});
The button would have to be changed to type="submit"
.
@dergraf, what do you think? what was your reasoning behind chaning the listener?
the problems you mentioned are quite strange... but can definitely reproduce them. will it work with the submit-listener?