diff options
-rw-r--r-- | templates/repo/diff/box.tmpl | 2 | ||||
-rw-r--r-- | web_src/js/features/repo-code.js | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index d2651d7e08..30039f0d1a 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -59,7 +59,7 @@ {{$showFileViewToggle := or $isImage (and (not $file.IsIncomplete) $isCsv)}} <div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} mt-3" id="diff-{{.Index}}" data-old-filename="{{$file.OldName}}" data-new-filename="{{$file.Name}}" {{if $file.IsGenerated}}data-folded="true"{{end}}> <h4 class="diff-file-header sticky-2nd-row ui top attached normal header df ac sb"> - <div class="fold-file df ac"> + <div class="df ac"> <a role="button" class="fold-file muted mr-2"> {{if $file.IsGenerated}} {{svg "octicon-chevron-right" 18}} diff --git a/web_src/js/features/repo-code.js b/web_src/js/features/repo-code.js index 74b3c1fba8..8a361a750d 100644 --- a/web_src/js/features/repo-code.js +++ b/web_src/js/features/repo-code.js @@ -131,9 +131,8 @@ export function initRepoCodeView() { } $(document).on('click', '.fold-file', ({currentTarget}) => { const box = currentTarget.closest('.file-content'); - const chevron = currentTarget.querySelector('a.chevron'); const folded = box.dataset.folded !== 'true'; - chevron.innerHTML = svg(`octicon-chevron-${folded ? 'right' : 'down'}`, 18); + currentTarget.innerHTML = svg(`octicon-chevron-${folded ? 'right' : 'down'}`, 18); box.dataset.folded = String(folded); }); $(document).on('click', '.blob-excerpt', async ({currentTarget}) => { |