defunkt / jquery-pjax

pushState + ajax = pjax
https://pjax.herokuapp.com
MIT License
16.73k stars 1.97k forks source link

Prevent form submit with pjax when "enter" is clicked in a form element #711

Open hanijazzar opened 5 years ago

hanijazzar commented 5 years ago

Is there a way to disable submitting a form when the "enter" key is clicked? I tried checking for the keycode 13 but it only works for non-pjax forms so it seems the problem is due to pjax. Thanks