From 985f03c0fbb5ce2f7f5bfe7d844bbf6036fd8094 Mon Sep 17 00:00:00 2001 From: Jeremy Elbourn Date: Wed, 25 Nov 2015 11:37:05 -0800 Subject: [PATCH] fix(datepicker): prevent calendar pane being in wrong position after body scrolling is disabled. Fixes #5201 --- src/components/datepicker/datePicker.js | 9 ++--- src/components/datepicker/datePicker.spec.js | 36 ++++++++++++++++++-- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/src/components/datepicker/datePicker.js b/src/components/datepicker/datePicker.js index abfb33e9ea9..cb13b55c342 100644 --- a/src/components/datepicker/datePicker.js +++ b/src/components/datepicker/datePicker.js @@ -502,8 +502,6 @@ if (!this.isCalendarOpen && !this.isDisabled) { this.isCalendarOpen = true; this.calendarPaneOpenedFrom = event.target; - this.attachCalendarPane(); - this.focusCalendar(); // Because the calendar pane is attached directly to the body, it is possible that the // rest of the component (input, etc) is in a different scrolling container, such as @@ -512,11 +510,14 @@ // also matches the native behavior for things like `