From 78a1e9d74922a0a0914f58e520b772cfdc3a8ec9 Mon Sep 17 00:00:00 2001 From: stan-z Date: Wed, 9 Oct 2013 06:30:58 -0700 Subject: [PATCH] fix(datapicker): set popup initial position in append-to-body case Set the initial position offsets of the datepicker popup element in case of appended to 'body'. Todo: refresh the position on parent elements resize. --- src/datepicker/datepicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datepicker/datepicker.js b/src/datepicker/datepicker.js index e001169125..c995dad9f3 100644 --- a/src/datepicker/datepicker.js +++ b/src/datepicker/datepicker.js @@ -414,7 +414,7 @@ function ($compile, $parse, $document, $position, dateFilter, datepickerPopupCon } function updatePosition() { - scope.position = $position.position(element); + scope.position = appendToBody ? $position.offset(element) : $position.position(element); scope.position.top = scope.position.top + element.prop('offsetHeight'); }