Bug 637215 - Regression: menulist popups don't show checkmarks [r=vingtetun]
--- a/mobile/chrome/content/SelectHelperUI.js
+++ b/mobile/chrome/content/SelectHelperUI.js
@@ -44,18 +44,18 @@ var SelectHelperUI = {
let item = document.createElement("listitem");
item.setAttribute("class", "option-command listitem-iconic prompt-button");
item.setAttribute("image", "");
item.setAttribute("flex", "1");
item.setAttribute("crop", "center");
item.setAttribute("label", choice.text);
- choice.selected ? item.setAttribute("selected", "true")
- : item.removeAttribute("selected");
+ choice.selected ? item.classList.add("selected")
+ : item.classList.remove("selected");
choice.disabled ? item.setAttribute("disabled", "true")
: item.removeAttribute("disabled");
fragment.appendChild(item);
if (choice.group) {
item.classList.add("optgroup");
continue;
@@ -63,17 +63,17 @@ var SelectHelperUI = {
item.optionIndex = choice.optionIndex;
item.choiceIndex = i;
if (choice.inGroup)
item.classList.add("in-optgroup");
if (choice.selected) {
- item.setAttribute("selected", "true");
+ item.classList.add("selected");
firstSelected = firstSelected || item;
}
}
this._listbox.appendChild(fragment);
this._container.hidden = false;
BrowserUI.pushPopup(this, this._container);
this._scrollElementIntoView(firstSelected);
--- a/mobile/themes/core/browser.css
+++ b/mobile/themes/core/browser.css
@@ -445,17 +445,17 @@ toolbarbutton.choice-remotetabs {
list-style-image: url("chrome://browser/skin/images/preferences-default-hdpi.png");
}
#tool-console {
list-style-image: url("chrome://browser/skin/images/console-default-hdpi.png");
}
/* preferences panel UI -----------------------------------------------------*/
-#menulist-container[for="prefs-homepage-options"] .menulist-command.selected {
+#menulist-container[for="prefs-homepage-options"] .options-command.selected {
pointer-events: none;
}
/* bug 597296 - The language.properties file is LTR and never translated */
#prefs-languages .menulist-label {
direction: ltr !important;
}
--- a/mobile/themes/core/forms.css
+++ b/mobile/themes/core/forms.css
@@ -204,23 +204,23 @@
font-size: @font_small@;
text-align: center;
}
.options-title[value=""] {
display: none;
}
-.option-command image {
+.option-command > image {
width: 30px;
height: 30px;
margin: @margin_tiny@;
}
-.option-command[selected="true"] image {
+.option-command.selected {
list-style-image: url("chrome://browser/skin/images/check-30.png");
}
.option-command.optgroup {
font-weight: bold;
font-style: italic;
}