fix: make navbar stopwatch button can show popup (#39562)

regression:
https://github.com/go-gitea/gitea/pull/36965#pullrequestreview-5400326165

partially backport the "href" fix from #39554
This commit is contained in:
wxiaoguang authored and GitHub committed 2026-10-03 16:58:45 +02:00
1 parent 638c75a4d3
commit 7440f1e452
2 files changed
+1 -2

No files matched your search

-1
View File
@@ -93,7 +93,6 @@ function updateStopwatchData(data: Array<StopwatchData>) {
} else {
const {repo_owner_name, repo_name, issue_index, seconds} = watch;
const issueUrl = `${appSubUrl}/${repo_owner_name}/${repo_name}/issues/${issue_index}`;
for (const btnEl of btnEls) btnEl.setAttribute('href', issueUrl);
document.querySelector('.stopwatch-link')?.setAttribute('href', issueUrl);
document.querySelector('.stopwatch-commit')?.setAttribute('action', `${issueUrl}/times/stopwatch/stop`);
document.querySelector('.stopwatch-cancel')?.setAttribute('action', `${issueUrl}/times/stopwatch/cancel`);