diff options
author | Keith Wood <kbwood.au@gmail.com> | 2009-04-10 10:09:03 +0000 |
---|---|---|
committer | Keith Wood <kbwood.au@gmail.com> | 2009-04-10 10:09:03 +0000 |
commit | a4065729e2f68ae0c47aa12e2c09cfc4c12a5bfe (patch) | |
tree | 03df867a397610517976d6bd92a0a2f277dc82e0 /ui/ui.datepicker.js | |
parent | 4ae29ba06be7bae219eaf9b4d60a902003e7cf33 (diff) | |
download | jquery-ui-a4065729e2f68ae0c47aa12e2c09cfc4c12a5bfe.tar.gz jquery-ui-a4065729e2f68ae0c47aa12e2c09cfc4c12a5bfe.zip |
Datepicker: Fixed #4348 - Datepicker positioned outside body when scrollbar enabled
Diffstat (limited to 'ui/ui.datepicker.js')
-rw-r--r-- | ui/ui.datepicker.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js index 82a3016d9..3e01a6ae0 100644 --- a/ui/ui.datepicker.js +++ b/ui/ui.datepicker.js @@ -250,8 +250,8 @@ $.extend(Datepicker.prototype, { this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null); if (!this._pos) { - var browserWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; - var browserHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; + var browserWidth = document.documentElement.clientWidth; + var browserHeight = document.documentElement.clientHeight; var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; var scrollY = document.documentElement.scrollTop || document.body.scrollTop; this._pos = // should use actual width/height below @@ -633,8 +633,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 = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + $(document).scrollLeft(); - var viewHeight = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) + $(document).scrollTop(); + var viewWidth = document.documentElement.clientWidth + $(document).scrollLeft(); + var viewHeight = document.documentElement.clientHeight + $(document).scrollTop(); offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0); offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0; |