diff --git a/lib/reporters/html.js b/lib/reporters/html.js
index 81f7c464ff..5167d18bfc 100644
--- a/lib/reporters/html.js
+++ b/lib/reporters/html.js
@@ -80,7 +80,8 @@ function HTML(runner) {
}
// pass toggle
- on(passesLink, 'click', function() {
+ on(passesLink, 'click', function(evt) {
+ evt.preventDefault();
unhide();
var name = (/pass/).test(report.className) ? '' : ' pass';
report.className = report.className.replace(/fail|pass/g, '') + name;
@@ -90,7 +91,8 @@ function HTML(runner) {
});
// failure toggle
- on(failuresLink, 'click', function() {
+ on(failuresLink, 'click', function(evt) {
+ evt.preventDefault();
unhide();
var name = (/fail/).test(report.className) ? '' : ' fail';
report.className = report.className.replace(/fail|pass/g, '') + name;