diff --git a/src/ui/css/diff2html.css b/src/ui/css/diff2html.css index beccebb0..e110ffbf 100644 --- a/src/ui/css/diff2html.css +++ b/src/ui/css/diff2html.css @@ -74,7 +74,7 @@ .d2h-file-collapse { justify-content: flex-end; - display: flex; + display: none; cursor: pointer; font-size: 12px; align-items: center; diff --git a/src/ui/js/diff2html-ui-base.ts b/src/ui/js/diff2html-ui-base.ts index 20bdd6c9..f6f6cfbf 100644 --- a/src/ui/js/diff2html-ui-base.ts +++ b/src/ui/js/diff2html-ui-base.ts @@ -112,7 +112,9 @@ export class Diff2HtmlUI { } fileContentToggle(): void { - this.targetElement.querySelectorAll('.d2h-file-collapse').forEach(fileContentToggleBtn => { + this.targetElement.querySelectorAll('.d2h-file-collapse').forEach(fileContentToggleBtn => { + fileContentToggleBtn.style.display = 'flex'; + const toggleFileContents: (selector: string) => void = selector => { const fileContents: HTMLElement | null | undefined = fileContentToggleBtn .closest('.d2h-file-wrapper')