Bug 1538588 - Correctly initialise attribute inheritance in date picker widgets; r+a=philipp
authorGeoff Lankow <geoff@darktrojan.net>
Wed, 27 Mar 2019 19:07:01 +1300
changeset 33974 327877d32257
parent 33973 6812e206e6d8
child 33975 ca5158979d6b
push id2394
push usermozilla@jorgk.com
push dateSat, 30 Mar 2019 21:10:54 +0000
treeherdercomm-beta@a07bc5354c40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1538588
Bug 1538588 - Correctly initialise attribute inheritance in date picker widgets; r+a=philipp
calendar/resources/content/datetimepickers/datetimepickers.js
--- a/calendar/resources/content/datetimepickers/datetimepickers.js
+++ b/calendar/resources/content/datetimepickers/datetimepickers.js
@@ -766,16 +766,18 @@ customElements.whenDefined("menulist-edi
                 this.value = this.getAttribute("value");
             };
             this._attributeObserver = new MutationObserver(this._handleMutation);
             this._attributeObserver.observe(this, {
                 attributes: true,
                 attributeFilter: ["value"],
             });
 
+            this.initializeAttributeInheritance();
+
             this._menulist.addEventListener("change", (event) => {
                 event.stopPropagation();
 
                 let value = parseDateTime(this._inputBoxValue);
                 if (!value) {
                     this._inputBoxValue = this._minimonthValue;
                     return;
                 }
@@ -921,16 +923,18 @@ customElements.whenDefined("menulist-edi
                 this.value = this.getAttribute("value");
             };
             this._attributeObserver = new MutationObserver(this._handleMutation);
             this._attributeObserver.observe(this, {
                 attributes: true,
                 attributeFilter: ["value"],
             });
 
+            this.initializeAttributeInheritance();
+
             this._inputField.addEventListener("change", (event) => {
                 event.stopPropagation();
 
                 let value = parseTime(this._inputBoxValue);
                 if (!value) {
                     this._inputBoxValue = this._gridValue;
                     return;
                 }
@@ -1050,16 +1054,18 @@ customElements.whenDefined("menulist-edi
             this.appendChild(this._datepicker);
             this.appendChild(this._timepicker);
 
             if (this.getAttribute("value")) {
                 this._datepicker.value = this.getAttribute("value");
                 this._timepicker.value = this.getAttribute("value");
             }
 
+            this.initializeAttributeInheritance();
+
             this._datepicker.addEventListener("change", (event) => {
                 event.stopPropagation();
                 this.dispatchEvent(new CustomEvent("change", { bubbles: true }));
             });
             this._timepicker.addEventListener("change", (event) => {
                 event.stopPropagation();
                 this.dispatchEvent(new CustomEvent("change", { bubbles: true }));
             });