From 09cc05a97f387d2342ad49c64d66da0b0b9ae7e7 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sat, 31 Mar 2018 07:07:45 +0200 Subject: Bug 1406859 - [DateTimePicker] Let the first picker close gracefully before opening a second picker --- toolkit/content/browser-content.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'toolkit/content') diff --git a/toolkit/content/browser-content.js b/toolkit/content/browser-content.js index 145de9608..1376f70a3 100644 --- a/toolkit/content/browser-content.js +++ b/toolkit/content/browser-content.js @@ -1714,6 +1714,14 @@ let DateTimePickerListener = { (aEvent.originalTarget.type == "time" && !this.getTimePickerPref())) { return; } + + if (this._inputElement) { + // This happens when we're trying to open a picker when another picker + // is still open. We ignore this request to let the first picker + // close gracefully. + return; + } + this._inputElement = aEvent.originalTarget; this._inputElement.setDateTimePickerState(true); this.addListeners(); -- cgit v1.2.3