Menu

#373 Calendar is positioned wrong in IE7 on the long pages

v1.0_(example)
open
nobody
5
2008-08-03
2008-08-03
Anonymous
No

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

Discussion

  • Nobody/Anonymous

    Thanks a lot!
    you save my day

     
  • Nobody/Anonymous

    THANK YOU THANK YOU THANK YOU....you saved me a day!

     
  • Nobody/Anonymous

    You're a legend - you saved me a day alright!

     
  • Nobody/Anonymous

    Thank!!! you, Save me a lot of time. Nice.

     
  • Nobody/Anonymous

    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;
    }

     
  • Nobody/Anonymous

    Thanks for this patch

     
  • Nobody/Anonymous

    Thanks!

    You saved me from going on a killing spree!

     

Log in to post a comment.