diff --git a/wp-includes/js/comment-reply.js b/wp-includes/js/comment-reply.js index 59cf5a1aa0..b916dc54d1 100644 --- a/wp-includes/js/comment-reply.js +++ b/wp-includes/js/comment-reply.js @@ -98,7 +98,7 @@ window.addComment = ( function( window ) { // Submit the comment form when the user types [Ctrl] or [Cmd] + [Enter]. var submitFormHandler = function( e ) { - if ( ( e.metaKey || e.ctrlKey ) && e.keyCode === 13 ) { + if ( ( e.metaKey || e.ctrlKey ) && e.keyCode === 13 && document.activeElement.tagName.toLowerCase() !== 'a' ) { commentFormElement.removeEventListener( 'keydown', submitFormHandler ); e.preventDefault(); // The submit button ID is 'submit' so we can't call commentFormElement.submit(). Click it instead. diff --git a/wp-includes/js/comment-reply.min.js b/wp-includes/js/comment-reply.min.js index ff42ec63ff..bd6017af4f 100644 --- a/wp-includes/js/comment-reply.min.js +++ b/wp-includes/js/comment-reply.min.js @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -window.addComment=function(v){var I,C,h,E=v.document,b={commentReplyClass:"comment-reply-link",commentReplyTitleId:"reply-title",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=v.MutationObserver||v.WebKitMutationObserver||v.MozMutationObserver,r="querySelector"in E&&"addEventListener"in v,n=!!E.documentElement.dataset;function t(){d(),e&&new e(o).observe(E.body,{childList:!0,subtree:!0})}function d(e){if(r&&(I=g(b.cancelReplyId),C=g(b.commentFormId),I)){I.addEventListener("touchstart",l),I.addEventListener("click",l);function t(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode)return C.removeEventListener("keydown",t),e.preventDefault(),C.submit.click(),!1}C&&C.addEventListener("keydown",t);for(var n,d=function(e){var t=b.commentReplyClass;e&&e.childNodes||(e=E);e=E.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return e}(e),o=0,i=d.length;o