Ticket #29974: 29974.patch
File 29974.patch, 1.3 KB (added by , 10 years ago) |
---|
-
src/wp-includes/js/comment-reply.js
1 1 var addComment = { 2 2 moveForm : function(commId, parentId, respondId, postId) { 3 var t = this, div, comm = t.I(commId), respond = t.I(respondId), cancel = t.I('cancel-comment-reply-link'), parent = t.I('comment_parent'), post = t.I('comment_post_ID'); 3 var t = this, 4 div, 5 comm = t.I(commId), 6 respond = t.I(respondId), 7 cancel = t.I('cancel-comment-reply-link'), 8 parent = t.I('comment_parent'), 9 post = t.I('comment_post_ID'), 10 commentForm = respond.getElementsByTagName('form')[0]; 4 11 5 12 if ( ! comm || ! respond || ! cancel || ! parent ) 6 13 return; … … 35 42 return false; 36 43 }; 37 44 38 try { t.I('comment').focus(); } 39 catch(e) {} 45 try { 46 for ( var i = 0; i < commentForm.elements.length; i++ ) { 47 if ( 'hidden' === commentForm.elements[i].type || true === commentForm.elements[i].disabled ) { 48 continue; 49 } 50 commentForm.elements[i].focus(); 51 respond.scrollIntoView(); 52 break; 53 } 54 } catch(e) {} 40 55 41 56 return false; 42 57 }, 43 44 58 I : function(e) { 45 59 return document.getElementById(e); 46 60 }