From: Keith Wood Date: Sat, 20 Sep 2008 06:04:45 +0000 (+0000) Subject: Fixed 3232 Datepicker position problem in IE 6/7 X-Git-Tag: 1.6rc3~587 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e51f56714b715790b63b68bb73066b264b5ffcb4;p=jquery-ui.git Fixed 3232 Datepicker position problem in IE 6/7 --- 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