diff --git a/TASVideos/Pages/Shared/_Layout.cshtml b/TASVideos/Pages/Shared/_Layout.cshtml index 134f03ade..149d3046a 100644 --- a/TASVideos/Pages/Shared/_Layout.cshtml +++ b/TASVideos/Pages/Shared/_Layout.cshtml @@ -164,6 +164,7 @@ } + diff --git a/TASVideos/TagHelpers/Attributes/MultiSelectTagHelper.cs b/TASVideos/TagHelpers/Attributes/MultiSelectTagHelper.cs index 7a1654863..06c522f94 100644 --- a/TASVideos/TagHelpers/Attributes/MultiSelectTagHelper.cs +++ b/TASVideos/TagHelpers/Attributes/MultiSelectTagHelper.cs @@ -18,6 +18,7 @@ public override void Process(TagHelperContext context, TagHelperOutput output) if (Multiselect) { output.Attributes.Add("data-multiselect", "true"); + output.AddCssClass("d-none-except-noscript"); ViewContext.ViewData.UseSelectImprover(); } } diff --git a/TASVideos/wwwroot/css/partials/_customizations.scss b/TASVideos/wwwroot/css/partials/_customizations.scss index 4ed96762a..33ed7de42 100644 --- a/TASVideos/wwwroot/css/partials/_customizations.scss +++ b/TASVideos/wwwroot/css/partials/_customizations.scss @@ -716,4 +716,8 @@ top-button-bar { padding: 0.5em; } } +} + +.d-none-except-noscript { + display: none !important; } \ No newline at end of file diff --git a/TASVideos/wwwroot/js/select-improver.js b/TASVideos/wwwroot/js/select-improver.js index fb97854ad..b5c1d37bb 100644 --- a/TASVideos/wwwroot/js/select-improver.js +++ b/TASVideos/wwwroot/js/select-improver.js @@ -103,7 +103,6 @@ function engageSelectImprover(multiSelectId, maxHeight = 250) { `; let multiSelect = document.getElementById(multiSelectId); - multiSelect.classList.add('d-none'); let div = document.getElementById(multiSelectId + '_div'); div?.remove(); multiSelect.insertAdjacentHTML('afterend', initialHtmlToAdd);