Make WordPress Core

Ticket #39958: 39958-2.patch

File 39958-2.patch, 743 bytes (added by mariovalney, 8 years ago)

Please ignore patch 1... hahaha

  • wp-includes/js/comment-reply.js

    diff --git a/wp-includes/js/comment-reply.js b/wp-includes/js/comment-reply.js
    index 184726d..df2bbc8 100644
    a b var addComment = { 
    1414                }
    1515
    1616                t.respondId = respondId;
     17                t.respondOffsetTop = comm.offsetTop;
    1718                postId = postId || false;
    1819
    1920                if ( ! t.I( 'wp-temp-form-div' ) ) {
    var addComment = { 
    4445                        temp.parentNode.removeChild( temp );
    4546                        this.style.display = 'none';
    4647                        this.onclick = null;
     48                        scroll(0, t.respondOffsetTop);
    4749                        return false;
    4850                };
    4951
    var addComment = { 
    8082                                        continue;
    8183                                }
    8284
     85                                scroll(0, element.offsetTop)
    8386                                element.focus();
    8487                                // Stop after the first focusable element.
    8588                                break;