| Fixed a bug when displaying calendar on IE7 ¶ | |
| Hello, There is a bug in the script on IE7. If the page is long enough to scroll and the calendar popup button is down below the main viewable area, when the user scrolls down and clicks on the calendar popup button the calendar will appear at the top of the page (where the element would be if the page doesn't scroll. I created a small updated script which fixes this issue on IE7 although I haven't tested it on IE6 because I don't have that browser anymore. My guess is that IE7 doesn't recognize the scrollTop, scrollLeft property anymore (or correctly). Added to line 90 of calendar.js // ADDED Added to line 1396 of calendar.js | |
| Re: Fixed a bug when displaying calendar on IE7 ¶ | |
| just in case anyone has any replies or additions I have subscribed to this thread. | |
| last |
| Re: Fixed a bug when displaying calendar on IE7 ¶ | |
| I Fixed the bug on my way, tested on IE7, IE6(Multiple IE), FF, and SAFARI, with those lines : if (document.body.scrollLeft){br.x += document.body.scrollLeft;} and it works. | |
| last |
| Re[2]: Fixed a bug when displaying calendar on IE7 ¶ | |
| Dave, did you mean like this ?: If I'm dong it right, this is better, except in IE7 when the positioning element is at the bottom of the screen, then the calendar is also, half off the screen. Seems to be ok in IE6 & FF. | |
| last |
| Re: Fixed a bug when displaying calendar on IE7 ¶ | |
| Try this - it uses feature detection instead of useragent detection: Place these two functions at the top of the file - or in a utility.js or whereever they'll be seen by the Calendar object: getViewportScrollX = function() { getViewportScrollY = function() { Replace this section starting at line 1392: if (Calendar.is_ie) { //Ugh! with calls to the above functions: br.x += getViewPortScrollX(); See here for more than you wanted to know about viewports: | |
| last |
| Re[2]: Fixed a bug when displaying calendar on IE7 ¶ | |
| Oops. First, put the two utility functions with the other utility functions and name them Calendar.getViewportScrollX and Calendar.getViewportScrollY. Second, capitali[z|s]ation is important. Replace the two lines setting br.x and br.y with the following: br.x += Calendar.getViewportScrollX(); Hopefully this should all now just work. Now all you need to do is grep through Calendar.js for document.body.ScrollTop and ScrollLeft and make everything use these two new utility functions instead. | |
| last |














