aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorGuy Pyrzak <guy.pyrzak@gmail.com>2010-09-19 01:20:02 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-09-19 01:20:02 +0200
commitf1d9113d83214ba08069f695ba176dec90a0d770 (patch)
tree5750bd801540c7a9d208061e5a354de31c1d7da7 /js
parentBug 577835: Improve the error message displayed when you put an invalid (diff)
downloadbugzilla-f1d9113d83214ba08069f695ba176dec90a0d770.tar.gz
bugzilla-f1d9113d83214ba08069f695ba176dec90a0d770.tar.bz2
bugzilla-f1d9113d83214ba08069f695ba176dec90a0d770.zip
Bug 574338: When comment box is positioned at [top|bottom], include "Add Comment" link at [bottom|top]
r/a=mkanat
Diffstat (limited to 'js')
-rw-r--r--js/comments.js11
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;
+}