summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-06-12 13:18:41 -0500
committerEric Eastwood <contact@ericeastwood.com>2017-06-13 08:54:26 -0500
commit56c00c0089decce0e5cc1b47e46e441078c035da (patch)
tree6e943d86426eec16400294f4792f122f51328c52
parent4124a1fba173622c0fa04dc50750ec7f542244bf (diff)
downloadgitlab-ce-33483-fix-note-highlight-being-lost-on-note-update.tar.gz
Fix note highlight being lost after real time update33483-fix-note-highlight-being-lost-on-note-update
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/33483 A bit of a browser hack to get it to re-evaluate what the `:target` is
-rw-r--r--app/assets/javascripts/notes.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index b0143b12cfe..ca57c8500f9 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -298,8 +298,13 @@ const normalizeNewlines = function(str) {
Notes.prototype.setupNewNote = function($note) {
// Update datetime format on the recent note
gl.utils.localTimeAgo($note.find('.js-timeago'), false);
+
this.collapseLongCommitList();
this.taskList.init();
+
+ // Refresh the `:target` selector
+ // This stops the note highlight from being removed after real time update
+ window.location = window.location;
};
/*