From 30bd2d9150baa5f931e7a3204a8e104569af2efb Mon Sep 17 00:00:00 2001 From: W Travis Jones Date: Tue, 6 Sep 2011 20:24:36 -0500 Subject: [PATCH] Datepicker: offset positioning now works with ie quirks mode. --- ui/jquery.ui.datepicker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 0b6fb2218b3..7ef29255726 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -763,8 +763,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 > 0) ? document.documentElement.clientWidth : document.body.clientWidth) + $(document).scrollLeft(); + var viewHeight = ((document.documentElement.clientHeight > 0) ? document.documentElement.clientHeight : document.body.clientHeight) + $(document).scrollTop(); offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0); offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;