Side navigation
Ticket #3258: ui.datepicker.js.patch
File ui.datepicker.js.patch, 1.0 KB (added by isfroch, August 18, 2008 01:16PM UTC)
Works with this changes
Index: ui.datepicker.js
===================================================================
--- ui.datepicker.js (revision 582)
+++ ui.datepicker.js (working copy)
@@ -583,8 +583,8 @@
/* 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
Download in other formats:
Original Format
File ui.datepicker.js.patch, 1.0 KB (added by isfroch, August 18, 2008 01:16PM UTC)
Works with this changes
Index: ui.datepicker.js
===================================================================
--- ui.datepicker.js (revision 582)
+++ ui.datepicker.js (working copy)
@@ -583,8 +583,8 @@
/* 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