Changeset 45790
- Timestamp:
- 08/13/2019 09:25:57 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/lib/comment-reply.js
r45641 r45790 96 96 cancelElement.addEventListener( 'click', cancelEvent ); 97 97 98 // Submit the comment form when the user types CTRL or CMD + 'Enter'. 99 var submitFormHandler = function( e ) { 100 if ( ( e.metaKey || e.ctrlKey ) && e.keyCode === 13 ) { 101 commentFormElement.removeEventListener( 'keydown', submitFormHandler ); 102 e.preventDefault(); 103 // The submit button ID is 'submit' so we can't call commentFormElement.submit(). Click it instead. 104 commentFormElement.submit.click(); 105 return false; 106 } 107 } 108 commentFormElement.addEventListener( 'keydown', submitFormHandler ); 109 98 110 var links = replyLinks( context ); 99 111 var element;
Note: See TracChangeset
for help on using the changeset viewer.