diff options
author | Keith Wood <kbwood.au@gmail.com> | 2008-09-20 06:04:45 +0000 |
---|---|---|
committer | Keith Wood <kbwood.au@gmail.com> | 2008-09-20 06:04:45 +0000 |
commit | e51f56714b715790b63b68bb73066b264b5ffcb4 (patch) | |
tree | d1c3aa708968c4ae69de34c4277a3ba94246d461 | |
parent | 99f8a711decebc577f3abe213cd1c8d8f0a0a364 (diff) | |
download | jquery-ui-e51f56714b715790b63b68bb73066b264b5ffcb4.tar.gz jquery-ui-e51f56714b715790b63b68bb73066b264b5ffcb4.zip |
Fixed 3232 Datepicker position problem in IE 6/7
-rw-r--r-- | ui/ui.datepicker.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js index 8c8df6921..abb778a83 100644 --- a/ui/ui.datepicker.js +++ b/ui/ui.datepicker.js @@ -606,8 +606,10 @@ $.extend(Datepicker.prototype, { /* Check positioning to remain on screen. */ _checkOffset: function(inst, offset, isFixed) { var pos = inst.input ? this._findPos(inst.input[0]) : null; - var browserWidth = window.innerWidth || document.documentElement.clientWidth; - var browserHeight = window.innerHeight || document.documentElement.clientHeight; + var browserWidth = window.innerWidth || (document.documentElement ? + document.documentElement.clientWidth : document.body.clientWidth); + var browserHeight = window.innerHeight || (document.documentElement ? + document.documentElement.clientHeight : document.body.clientHeight); var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; var scrollY = document.documentElement.scrollTop || document.body.scrollTop; // reposition date picker horizontally if outside the browser window |