summaryrefslogtreecommitdiffstats
path: root/toolkit/content/widgets/menulist.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /toolkit/content/widgets/menulist.js
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/content/widgets/menulist.js')
-rw-r--r--toolkit/content/widgets/menulist.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/toolkit/content/widgets/menulist.js b/toolkit/content/widgets/menulist.js
index 3672d4ccf1..c7bff9c9d0 100644
--- a/toolkit/content/widgets/menulist.js
+++ b/toolkit/content/widgets/menulist.js
@@ -124,8 +124,6 @@
this.shadowRoot.appendChild(document.createElement("slot"));
}
- this.mSelectedInternal = null;
- this.mAttributeObserver = null;
this.setInitialSelection();
}
@@ -153,7 +151,7 @@
// nsIDOMXULSelectControlElement
get value() {
- return this.getAttribute("value");
+ return this.getAttribute("value") || "";
}
// nsIDOMXULMenuListElement
@@ -163,12 +161,12 @@
// nsIDOMXULMenuListElement
get image() {
- return this.getAttribute("image");
+ return this.getAttribute("image") || "";
}
// nsIDOMXULMenuListElement
get label() {
- return this.getAttribute("label");
+ return this.getAttribute("label") || "";
}
set description(val) {
@@ -176,7 +174,7 @@
}
get description() {
- return this.getAttribute("description");
+ return this.getAttribute("description") || "";
}
// nsIDOMXULMenuListElement
@@ -292,6 +290,10 @@
if (this.getAttribute("noinitialselection") === "true") {
return;
}
+
+ this.mSelectedInternal = null;
+ this.mAttributeObserver = null;
+
var popup = this.menupopup;
if (popup) {
var arr = popup.getElementsByAttribute("selected", "true");