Commit 5b876592 authored by Yar's avatar Yar Committed by YarNayar

Fix double event and xhr request call on MR page !7298

On page merge_requests/n/diffs and merge_requests/n/commits 'shown.bs.tab' event triggers twice when tab is loading  which lead to  extra ajax request for data each time.
This commit prevent this event from triggering twice when tab is loading.
parent 7957b204
......@@ -145,7 +145,8 @@
if (action === 'show') {
action = 'notes';
}
$(".merge-request-tabs a[data-action='" + action + "']").tab('show').trigger('shown.bs.tab');
// important note: the .tab('show') method triggers 'shown.bs.tab' event itself
$(".merge-request-tabs a[data-action='" + action + "']").tab('show');
};
// Replaces the current Merge Request-specific action in the URL with a new one
......
---
title: Fix double event and ajax request call on MR page
merge_request: 7298
author: YarNayar
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