From 0488a70335a98cebf53aff401acbf2ade474c962 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Tue, 5 May 2026 10:54:27 +0100 Subject: [PATCH] appview/pages: preserve hash on permalink navigation Signed-off-by: oppiliappan --- appview/pages/templates/repo/fragments/permalinkShortcut.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appview/pages/templates/repo/fragments/permalinkShortcut.html b/appview/pages/templates/repo/fragments/permalinkShortcut.html index 71fffd35..a6e0bd6a 100644 --- a/appview/pages/templates/repo/fragments/permalinkShortcut.html +++ b/appview/pages/templates/repo/fragments/permalinkShortcut.html @@ -7,7 +7,7 @@ document.addEventListener('keydown', (e) => { if(e.key === 'y' && !e.ctrlKey && !e.metaKey && !e.altKey) { if(e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') return; - const permalinkUrl = '/{{ .RepoInfo.RepoIdentifier }}/tree/{{ .LastCommitInfo.Hash }}/{{ .Path }}'; + const permalinkUrl = '/{{ .RepoInfo.RepoIdentifier }}/tree/{{ .LastCommitInfo.Hash }}/{{ .Path }}' + window.location.hash; window.location.href = permalinkUrl; } }, {signal: abortController.signal}); -- 2.51.2