From d09969f1ec0d3fb1c161ff271612eb64ddc7e580 Mon Sep 17 00:00:00 2001 From: Leonabcd123 <156839416+Leonabcd123@users.noreply.github.com> Date: Mon, 5 Jan 2026 18:54:06 +0200 Subject: [PATCH] fix(tags): selected tags not being highlighted in test result (@Leonabcd123) (#7312) ### Description Update `data-active-tag-ids` instead of `active-tag-ids`, extract updating part from if statement. Fixes the following bug: - Create a tag - Complete a test - Click on the edit tags button - Click on the newly created tag - Click on the edit tags button again - The tag won't be highlighted in yellow Co-authored-by: Jack --- frontend/src/ts/test/result.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/ts/test/result.ts b/frontend/src/ts/test/result.ts index 24905cad8..ec2b9f068 100644 --- a/frontend/src/ts/test/result.ts +++ b/frontend/src/ts/test/result.ts @@ -1262,11 +1262,12 @@ export function updateTagsAfterEdit( // $(`.pageTest #result .tags .bottom`).html(tagNames.join("
")); $(`.pageTest #result .tags .bottom`).append(html); - $(`.pageTest #result .tags .top .editTagsButton`).attr( - "active-tag-ids", - tagIds.join(","), - ); } + + $(`.pageTest #result .tags .top .editTagsButton`).attr( + "data-active-tag-ids", + tagIds.join(","), + ); } $(".pageTest #result .chart .chartLegend button").on("click", (event) => {