User:Majesty of the Commons/StopEnterPublishing.js

// Prevent a press of the Enter key when focus is in either the "Edit Summary" text box // or the "This is a minor edit" or "Watch this page" checkboxes from publishing an edit. // // $(function {  $('#editform').keydown(function(e) { if (e.which == 13 && e.target.type !== 'textarea' && e.target.nodeName === 'INPUT') e.preventDefault; }); });