diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 1748ac7eaa31..dd719fc70070 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -165,6 +165,7 @@ hidden="true" orient="vertical" noautofocus="true" + noautohide="true" consumeoutsideclicks="false" level="parent" tabspecific="true"> diff --git a/toolkit/content/widgets/datetimebox.xml b/toolkit/content/widgets/datetimebox.xml index fea82f3fb23c..59442481458d 100644 --- a/toolkit/content/widgets/datetimebox.xml +++ b/toolkit/content/widgets/datetimebox.xml @@ -1134,6 +1134,9 @@ capture: true, mozSystemGroup: true }); + // This is to close the picker when input element blurs. + this.mInputElement.addEventListener("blur", this, + { mozSystemGroup: true }); ]]> @@ -1589,12 +1592,17 @@ diff --git a/toolkit/content/widgets/datetimepopup.xml b/toolkit/content/widgets/datetimepopup.xml index e107c60690dc..b3ca5b9eef22 100644 --- a/toolkit/content/widgets/datetimepopup.xml +++ b/toolkit/content/widgets/datetimepopup.xml @@ -28,11 +28,11 @@ // Notify DateTimePickerHelper.jsm that binding is ready. this.dispatchEvent(new CustomEvent("DateTimePickerBindingReady")); ]]> - + + @@ -310,12 +313,5 @@ - - - - - diff --git a/toolkit/modules/DateTimePickerHelper.jsm b/toolkit/modules/DateTimePickerHelper.jsm index ab82bb782560..464964ad96d8 100644 --- a/toolkit/modules/DateTimePickerHelper.jsm +++ b/toolkit/modules/DateTimePickerHelper.jsm @@ -136,9 +136,9 @@ this.DateTimePickerHelper = { return; } // The datetimepopup binding is only attached when it is needed. - // Check if loadPicker method is present to determine if binding has + // Check if openPicker method is present to determine if binding has // been attached. If not, attach the binding first before calling it. - if (!this.picker.loadPicker) { + if (!this.picker.openPicker) { let bindingPromise = new Promise(resolve => { this.picker.addEventListener("DateTimePickerBindingReady", resolve, {once: true}); @@ -146,10 +146,9 @@ this.DateTimePickerHelper = { this.picker.setAttribute("active", true); yield bindingPromise; } - this.picker.loadPicker(type, detail); // The arrow panel needs an anchor to work. The popupAnchor (this._anchor) // is a transparent div that the arrow can point to. - this.picker.openPopup(this._anchor, "after_start", 0, 0); + this.picker.openPicker(type, this._anchor, detail); this.addPickerListeners(); }),