Commit e45064e8 authored by Clement Ho's avatar Clement Ho

Fix diff comments inverted toggle bug

parent 06e3bb9f
......@@ -85,6 +85,7 @@ v 8.11.0 (unreleased)
- Allow branch names ending with .json for graph and network page !5579 (winniehell)
- Add the `sprockets-es6` gem
- Improve OAuth2 client documentation (muteor)
- Fix diff comments inverted toggle bug (ClemMakesApps)
- Multiple trigger variables show in separate lines (Katarzyna Kobierska Ula Budziszewska)
- Profile requests when a header is passed
- Avoid calculation of line_code and position for _line partial when showing diff notes on discussion tab.
......
......@@ -223,8 +223,11 @@
return $('.navbar-toggle').toggleClass('active');
});
$body.on("click", ".js-toggle-diff-comments", function(e) {
$(this).toggleClass('active');
$(this).closest(".diff-file").find(".notes_holder").toggle();
var $this = $(this);
var showComments = $this.hasClass('active');
$this.toggleClass('active');
$this.closest(".diff-file").find(".notes_holder").toggle(showComments);
return e.preventDefault();
});
$document.off("click", '.js-confirm-danger');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment