Menu

#359 Calendar position in IE7

open
nobody
None
5
2008-02-21
2008-02-21
Anonymous
No

We have been having a problem with the position of the calender widget in IE. In firefox when the widget invoker button is near the bottom of the page, the calendar pops up below the status bar of the browser. But in IE when the calendar pops up the widget is below the status bar of the browser, hence sometimes its hard to know that it even poped up.

-
sanoop@sg.ibm.com

Discussion

  • Nobody/Anonymous

    Screenshot for IE and Forefox

     
  • Nobody/Anonymous

    Logged In: NO

    There was a typo there, In firefox the widget pops up above the status bar

    **EDIT**

    In firefox when the widget invoker button is near the bottom of the
    page, the calendar pops up above the status bar of the browser. But in IE
    when the calendar pops up the widget is below the status bar of the
    browser, hence sometimes its hard to know that it even poped up.

    **EDIT**

     
  • waldemar jonik

    waldemar jonik - 2008-03-27

    Logged In: YES
    user_id=2047142
    Originator: NO

    we have the same problem on IE7 - the position of calendar is invalid when the page is longer than browser screen and the invoke button is near of the page

     
  • Ian Kilty

    Ian Kilty - 2008-04-08

    Logged In: YES
    user_id=2048742
    Originator: NO

    I am having the same problem in BOTH IE 6 and IE 7. The recommend fix does not fix the problem. Please help...

     
  • Nobody/Anonymous

    I have had this same problem and found a solution. Here is what you need to do:

    In the calendar.js file, the function fixPosition(box), which is at line 1380 in the most current download, there is a check for whether or not the browser 'is_ie" and determines how to display the calendar. Well, this is what causes the calendar to mess up in IE7. The original code reads:

    if (Calendar.is_ie) {
    br.y += document.body.scrollTop;
    br.x += document.body.scrollLeft;
    } else {
    br.y += window.scrollY;
    br.x += window.scrollX;
    }

    You can comment this code out and change it to this:

    br.y += window.scrollY;
    br.x += window.scrollX;

    The check for "is_ie" is not actually needed and by using the code in the if statement it was causes it to mess up. I have tested this in IE6, and did not experience any problems, and based on the fact that almost no one uses anything below IE6, you should be safe, but as always, test your page to ensure that it doesn't break.

    Hope that helps. I'm not sure how to submit this fix to the people who actually maintain this code, but if someone does, then feel free to do so.

     

Log in to post a comment.