mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Datepicker: Fixed position problem when input is in a fixed element. Fixes #5626 - DatePicker doesn't work inside fixed div.
(cherry picked from commit 147ec7bd62
)
This commit is contained in:
parent
fa5e7c17a8
commit
9c1780f640
4
ui/jquery.ui.datepicker.js
vendored
4
ui/jquery.ui.datepicker.js
vendored
@ -765,8 +765,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;
|
||||
|
Loading…
Reference in New Issue
Block a user