Make WordPress Core

Ticket #48536: 48536.3.diff

File 48536.3.diff, 848 bytes (added by davidbaumwald, 6 years ago)
  • src/js/_enqueues/admin/edit-comments.js

    diff --git a/src/js/_enqueues/admin/edit-comments.js b/src/js/_enqueues/admin/edit-comments.js
    index 1a64268b6a..3aa833f914 100644
    a b window.commentReply = { 
    793793                $( '.cancel', row ).click( function() { return commentReply.revert(); } );
    794794                $( '.save', row ).click( function() { return commentReply.send(); } );
    795795                $( 'input#author-name, input#author-email, input#author-url', row ).keypress( function( e ) {
    796                         if ( e.which == 13 ) {
     796                        if ( e.which === 13 ) {
     797                                commentReply.send();
     798                                e.preventDefault();
     799                                return false;
     800                        }
     801                });
     802
     803                $( 'textarea#replycontent', row ).keypress( function( e ) {
     804                        if ( ( e.metaKey || e.ctrlKey ) && e.which === 13 ) {
    797805                                commentReply.send();
    798806                                e.preventDefault();
    799807                                return false;