mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 16:58:38 +09:00
Bug 1406859 - [DateTimePicker] Let the first picker close gracefully before opening a second picker
This commit is contained in:
parent
def56bfceb
commit
c65886be35
2 changed files with 9 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ this.DateTimePickerHelper = {
|
|||
return;
|
||||
}
|
||||
this.picker.closePicker();
|
||||
this.close();
|
||||
break;
|
||||
}
|
||||
case "FormDateTime:UpdatePicker": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue