diff --git a/templates/repo/issue/sidebar/assignee_list.tmpl b/templates/repo/issue/sidebar/assignee_list.tmpl
index 1d2279a45d..f66a38d182 100644
--- a/templates/repo/issue/sidebar/assignee_list.tmpl
+++ b/templates/repo/issue/sidebar/assignee_list.tmpl
@@ -1,5 +1,7 @@
{{$pageMeta := .}}
{{$data := .AssigneesData}}
+{{$listBaseLink := print $pageMeta.RepoLink (Iif $pageMeta.IsPullRequest "/pulls" "/issues")}}
+{{/* TODO: it seems that the code keeps checking $pageMeta.Issue and assumes that it might not exist, need to figure out why */}}
{{$issueAssignees := NIL}}{{if $pageMeta.Issue}}{{$issueAssignees = $pageMeta.Issue.Assignees}}{{end}}
{{range $data.CandidateAssignees}}
-
+
{{svg "octicon-check"}}
{{ctx.AvatarUtils.Avatar . 20}} {{template "repo/search_name" .}}
@@ -30,8 +32,8 @@
diff --git a/templates/repo/issue/sidebar/label_list.tmpl b/templates/repo/issue/sidebar/label_list.tmpl
index 15c8760d1a..d30196326b 100644
--- a/templates/repo/issue/sidebar/label_list.tmpl
+++ b/templates/repo/issue/sidebar/label_list.tmpl
@@ -1,5 +1,6 @@
{{$pageMeta := .}}
{{$data := .LabelsData}}
+{{$listBaseLink := print $pageMeta.RepoLink (Iif $pageMeta.IsPullRequest "/pulls" "/issues")}}
{{end}}
@@ -47,7 +48,7 @@
{{ctx.Locale.Tr "repo.issues.new.no_label"}}
{{range $data.AllLabels}}
{{if .IsChecked}}
-
+
{{- ctx.RenderUtils.RenderLabel . -}}
{{end}}
diff --git a/templates/repo/issue/sidebar/label_list_item.tmpl b/templates/repo/issue/sidebar/label_list_item.tmpl
index 5c6808d95b..0c32d99bf9 100644
--- a/templates/repo/issue/sidebar/label_list_item.tmpl
+++ b/templates/repo/issue/sidebar/label_list_item.tmpl
@@ -1,5 +1,6 @@
{{$label := .Label}}
-
{{svg (Iif $label.ExclusiveScope "octicon-dot-fill" "octicon-check")}}
diff --git a/web_src/js/features/repo-issue-sidebar.md b/web_src/js/features/repo-issue-sidebar.md
index e1ce0927e1..d732bc6f54 100644
--- a/web_src/js/features/repo-issue-sidebar.md
+++ b/web_src/js/features/repo-issue-sidebar.md
@@ -23,6 +23,16 @@ When the selected items change, the `combo-value` input will be updated.
If there is `data-update-url`, it also calls backend to attach/detach the changed items.
Also, the changed items will be synchronized to the `ui list` items.
+The menu items must have correct `href`, otherwise the links of synchronized (cloned) items would be wrong.
+
+Synchronization logic:
+* On page load:
+ * If the dropdown menu contains checked items, there will be no synchronization.
+ In this case, it's assumed that the dropdown menu is already in sync with the list.
+ * If the dropdown menu doesn't contain checked items, it will use dropdown's value to mark the selected items as checked.
+ And the selected (checked) items will be synchronized to the list.
+* On dropdown selection change:
+ * The selected items will be synchronized to the list after the dropdown is hidden
The items with the same data-scope only allow one selected at a time.