Skip to content
Snippets Groups Projects
Commit 56c00c00 authored by Eric Eastwood's avatar Eric Eastwood
Browse files

Fix note highlight being lost after real time 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
parent 4124a1fb
No related branches found
No related tags found
No related merge requests found
Pipeline #
Loading
Loading
@@ -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;
};
 
/*
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment