diff --git a/static/js/theme.js b/static/js/theme.js index 9e54d418e7..ea4ee4cfb3 100644 --- a/static/js/theme.js +++ b/static/js/theme.js @@ -216,11 +216,21 @@ function initMermaid( update, attrs ) { attrs = attrs || { 'theme': variants.getColorValue( 'MERMAID-theme' ), }; + + var search; + if( update ){ + search = sessionStorage.getItem( baseUriFull+'search-value' ); + unmark(); + } var is_initialized = ( update ? update_func( attrs ) : init_func( attrs ) ); if( is_initialized ){ mermaid.init(); $(".mermaid svg").svgPanZoom({}); } + if( update && search && search.length ){ + sessionStorage.setItem( baseUriFull+'search-value', search ); + mark(); + } } function initSwagger( update, attrs ){