diff options
Diffstat (limited to 'js/comments.js')
-rw-r--r-- | js/comments.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/comments.js b/js/comments.js index 79bdae855..697cedd20 100644 --- a/js/comments.js +++ b/js/comments.js @@ -86,3 +86,14 @@ function addCollapseLink(count) { '); return false;" title="Collapse the comment.">[-]<\/a> '); } +function goto_add_comments( anchor ){ + anchor = (anchor || "add_comment"); + // we need this line to expand the comment box + document.getElementById('comment').focus(); + setTimeout(function(){ + document.location.hash = anchor; + // firefox doesn't seem to keep focus through the anchor change + document.getElementById('comment').focus(); + },10); + return false; +} |