Commit 4799db3b authored by Phil Hughes's avatar Phil Hughes

Fixes mermaid graphs not rendering when switching diff tabs

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/220889
parent d0981554
......@@ -174,7 +174,7 @@ export default function renderMermaid($els) {
if (!$els.length) return;
const visibleMermaids = $els.filter(function filter() {
return $(this).closest('details').length === 0;
return $(this).closest('details').length === 0 && $(this).is(':visible');
});
renderMermaids(visibleMermaids);
......
......@@ -226,6 +226,8 @@ export default class MergeRequestTabs {
this.resetViewContainer();
this.destroyPipelinesView();
}
$('.detail-page-description').renderGFM();
} else if (action === this.currentAction) {
// ContentTop is used to handle anything at the top of the page before the main content
const mainContentContainer = document.querySelector('.content-wrapper');
......
---
title: Fixed mermaid not rendering when switching diff tabs
merge_request:
author:
type: fixed
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