Make WordPress Core

Ticket #48536: 48536.diff

File 48536.diff, 636 bytes (added by davidbaumwald, 6 years ago)

Updated with keypress

  • 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 4391d50fef..2ea373e187 100644
    a b window.commentReply = { 
    798798                        }
    799799                });
    800800
     801                $( 'textarea#replycontent', row ).keypress( function( e ) {
     802                        if ( ( e.metaKey || e.ctrlKey ) && ( e.which == 10 || e.which == 13 ) ) {
     803                                commentReply.send();
     804                                e.preventDefault();
     805                                return false;
     806                        }
     807                });
     808
    801809                // add events
    802810                $('#the-comment-list .column-comment > p').dblclick(function(){
    803811                        commentReply.toggle($(this).parent());