summaryrefslogtreecommitdiffstats
path: root/extensions/TrackingFlags
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-03-24 06:45:44 +0100
committerByron Jones <glob@mozilla.com>2015-03-24 06:45:44 +0100
commit3ac701266452d3509776fe58f9e1b2b8e9f33c1e (patch)
tree88124baaadb529b1c9809f6b3fa20384c1870780 /extensions/TrackingFlags
parent11bd061970f8b9c98e6af43a4c8c7ca4bfff9eb3 (diff)
downloadbugzilla-3ac701266452d3509776fe58f9e1b2b8e9f33c1e.tar.gz
bugzilla-3ac701266452d3509776fe58f9e1b2b8e9f33c1e.tar.xz
Bug 1096798: prototype modal show_bug view
Diffstat (limited to 'extensions/TrackingFlags')
-rw-r--r--extensions/TrackingFlags/web/js/tracking_flags.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/extensions/TrackingFlags/web/js/tracking_flags.js b/extensions/TrackingFlags/web/js/tracking_flags.js
index b0bdb2ebd..0b899676c 100644
--- a/extensions/TrackingFlags/web/js/tracking_flags.js
+++ b/extensions/TrackingFlags/web/js/tracking_flags.js
@@ -55,16 +55,18 @@ function tracking_flag_change(e) {
// create "comment required"
var span = document.createElement('span');
span.id = 'cr_' + e.id;
- span.appendChild(document.createTextNode('('));
+ span.appendChild(document.createTextNode(' ('));
var a = document.createElement('a');
a.appendChild(document.createTextNode('comment required'));
a.href = '#';
- a.onclick = function() {
+ a.onclick = function(event) {
+ event.preventDefault();
var c = document.getElementById('comment');
c.focus();
c.select();
- document.getElementById('add_comment').scrollIntoView();
- return false;
+ var btn = document.getElementById('add_comment') || document.getElementById('add-comment');
+ if (btn)
+ btn.scrollIntoView();
};
span.appendChild(a);
span.appendChild(document.createTextNode(')'));