diff --git a/web_src/js/index.js b/web_src/js/index.js
index 7f3874b857..a7aa0d52c4 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -2019,6 +2019,7 @@ function initCodeView() {
     $.get(`${$blob.data('url')}?${$blob.data('query')}&anchor=${$blob.data('anchor')}`, (blob) => {
       $row.replaceWith(blob);
       $(`[data-anchor="${$blob.data('anchor')}"]`).on('click', (e) => { insertBlobExcerpt(e); });
+      $('.diff-detail-box.ui.sticky').sticky();
     });
   }
   $('.ui.blob-excerpt').on('click', (e) => { insertBlobExcerpt(e); });