Skip to content

A platform for community discussion. Free, open, simple.

FIX: makes sure category and tag drop headers have a title

Joffrey JAFFEUXc722fc51642d
diff --git a/app/assets/javascripts/select-kit/components/category-drop.js.es6 b/app/assets/javascripts/select-kit/components/category-drop.js.es6
index f0622b3c2bc..ab63744f44d 100644
--- a/app/assets/javascripts/select-kit/components/category-drop.js.es6
+++ b/app/assets/javascripts/select-kit/components/category-drop.js.es6
@@ -91,6 +91,7 @@ export default ComboBoxComponent.extend({
if (this.get("hasSelection")) {
const category = Category.findById(content.value);
+ content.title = category.title;
content.label = categoryBadgeHTML(category, {
link: false,
allowUncategorized: true,
@@ -101,10 +102,12 @@ export default ComboBoxComponent.extend({
content.label = `<span class="category-name">${this.get(
"noCategoriesLabel"
)}</span>`;
+ content.title = this.get("noCategoriesLabel");
} else {
content.label = `<span class="category-name">${this.get(
"allCategoriesLabel"
)}</span>`;
+ content.title = this.get("allCategoriesLabel");
}
}
diff --git a/app/assets/javascripts/select-kit/components/tag-drop.js.es6 b/app/assets/javascripts/select-kit/components/tag-drop.js.es6
index e5082277474..ac7267a2a6a 100644
--- a/app/assets/javascripts/select-kit/components/tag-drop.js.es6
+++ b/app/assets/javascripts/select-kit/components/tag-drop.js.es6
@@ -43,10 +43,12 @@ export default ComboBoxComponent.extend({
if (!content.value) {
if (this.get("noTagsSelected")) {
- content.label = this.get("noTagsLabel");
+ content.title = this.get("noTagsLabel");
} else {
- content.label = this.get("allTagsLabel");
+ content.title = this.get("allTagsLabel");
}
+ } else {
+ content.title = content.value;
}
return content;