aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.datepicker.js
diff options
context:
space:
mode:
authorLuis Dalmolin <luis.nh@gmail.com>2012-07-16 09:54:48 -0300
committerScott González <scott.gonzalez@gmail.com>2012-07-17 16:22:03 -0400
commit147ec7bd624e631fe019973876ad587e85d112bf (patch)
tree74ec4a708a93b4ecb8b44b0d24bc04e5cb958132 /ui/jquery.ui.datepicker.js
parentcb44dc6c2840a77fbb13a398910ca8818d6439e3 (diff)
downloadjquery-ui-147ec7bd624e631fe019973876ad587e85d112bf.tar.gz
jquery-ui-147ec7bd624e631fe019973876ad587e85d112bf.zip
Datepicker: Fixed position problem when input is in a fixed element. Fixes #5626 - DatePicker doesn't work inside fixed div.
Diffstat (limited to 'ui/jquery.ui.datepicker.js')
-rw-r--r--ui/jquery.ui.datepicker.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 1b80e3bdb..692832d19 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -766,8 +766,8 @@ $.extend(Datepicker.prototype, {
var dpHeight = inst.dpDiv.outerHeight();
var inputWidth = inst.input ? inst.input.outerWidth() : 0;
var inputHeight = inst.input ? inst.input.outerHeight() : 0;
- var viewWidth = document.documentElement.clientWidth + $(document).scrollLeft();
- var viewHeight = document.documentElement.clientHeight + $(document).scrollTop();
+ var viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft());
+ var viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;