Commit b9c57808 authored by Jacob Schatz's avatar Jacob Schatz

Merge branch...

Merge branch '26825-diff-unfolding-within-merge-request-changes-tab-triggers-two-ajax-requests' into 'master'

Resolve diff unfolding redundant ajax request

Closes #26825

See merge request !8630
parents d5a9e934 7c29f03e
......@@ -4,6 +4,7 @@
(() => {
const UNFOLD_COUNT = 20;
let isBound = false;
class Diff {
constructor() {
......@@ -17,10 +18,12 @@
$('.content-wrapper .container-fluid').removeClass('container-limited');
}
if (!isBound) {
$(document)
.off('click', '.js-unfold, .diff-line-num a')
.on('click', '.js-unfold', this.handleClickUnfold.bind(this))
.on('click', '.diff-line-num a', this.handleClickLineNum.bind(this));
isBound = true;
}
this.openAnchoredDiff();
}
......
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