Calendar is positioned wrong in IE7 on the long pages
Brought to you by:
mishoo
Hi,
I spent about a day figuring out why calendar is not displayed in the right place in IE7 on the page with a scroll-bar. It looks like an adjustment should be done in calendar.js, lines 1393-1394 in function fixPosition(box):
those two lines:
br.y += document.body.scrollTop;
br.x += document.body.scrollLeft;
according to w3c they should be replaced to:
br.y += document.documentElement.scrollTop;
br.x += document.documentElement.scrollLeft;
I hope it will save someone a day :)
Thank you
Thanks a lot!
you save my day
THANK YOU THANK YOU THANK YOU....you saved me a day!
You're a legend - you saved me a day alright!
Thank!!! you, Save me a lot of time. Nice.
Thanks for the hint.
But you have do check if you have IE6 OR IE7, otherwise a calendar at the end of a scrolled page will be shown "outside" the browser window.
Add this line (at line 91)
NEW LINE (after line 91)
Calendar.is_ie7 = ( Calendar.is_ie && /msie 7\.0/i.test(navigator.userAgent) );
REPLACE LINES (1393-1394)
br.y += document.body.scrollTop;
br.x += document.body.scrollLeft;
WITH THESE LINES
// BugFixed 1008-11-06 for IE7
if(Calendar.is_ie7) {
br.y += document.body.scrollTop;
br.x += document.body.scrollLeft; } else {
br.y += document.documentElement.scrollTop;
br.x += document.documentElement.scrollLeft;
}
Thanks for this patch
Thanks!
You saved me from going on a killing spree!