Commit b22232b4 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/220889/fixMermaidNotRendering' into 'master'

Fixes mermaid graphs not rendering when switching diff tabs

Closes #220889

See merge request gitlab-org/gitlab!35023
parents e47a8f3e 6567d033
......@@ -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: 35023
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