From 72760cf0fe7caa41f4fbfd474e092fa5773bed81 Mon Sep 17 00:00:00 2001 From: Mikhail Bashkirov Date: Mon, 27 May 2019 16:30:22 +0200 Subject: [PATCH] fix(input-datepicker): fix race condition which breaks focus --- packages/input-datepicker/src/LionInputDatepicker.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/input-datepicker/src/LionInputDatepicker.js b/packages/input-datepicker/src/LionInputDatepicker.js index 061311b04..6d9a24c1e 100644 --- a/packages/input-datepicker/src/LionInputDatepicker.js +++ b/packages/input-datepicker/src/LionInputDatepicker.js @@ -306,7 +306,10 @@ export class LionInputDatepicker extends LionInputDate { async __openCalendarOverlay() { this._overlayCtrl.show(); - await this._calendarElement.updateComplete; + await Promise.all([ + this._calendarOverlayElement.updateComplete, + this._calendarElement.updateComplete, + ]); this._onCalendarOverlayOpened(); }