Make WordPress Core

Ticket #47306: addComment_more_references-2.patch

File addComment_more_references-2.patch, 1.2 KB (added by jnorell, 6 years ago)
  • wp-includes/js/comment-reply.js

    diff --git a/wp-includes/js/comment-reply.js b/wp-includes/js/comment-reply.js
    index 75fc183..7d155b7 100644
    a b window.addComment = ( function( window ) { 
    9292                        return;
    9393                }
    9494
    95                 cancelElement.addEventListener( 'touchstart', cancelEvent );
    96                 cancelElement.addEventListener( 'click',      cancelEvent );
     95                cancelElement.addEventListener( 'touchstart', window.addComment.cancelEvent );
     96                cancelElement.addEventListener( 'click',      window.addComment.cancelEvent );
    9797
    9898                var links = replyLinks( context );
    9999                var element;
    window.addComment = ( function( window ) { 
    101101                for ( var i = 0, l = links.length; i < l; i++ ) {
    102102                        element = links[i];
    103103
    104                         element.addEventListener( 'touchstart', clickEvent );
    105                         element.addEventListener( 'click',      clickEvent );
     104                        element.addEventListener( 'touchstart', window.addComment.clickEvent );
     105                        element.addEventListener( 'click',      window.addComment.clickEvent );
    106106                }
    107107        }
    108108
    window.addComment = ( function( window ) { 
    385385        }
    386386
    387387        return {
     388                config: config,
    388389                init: init,
     390                clickEvent: clickEvent,
     391                cancelEvent: cancelEvent,
    389392                moveForm: moveForm
    390393        };
    391394})( window );