From b7929b2ab9544d5c7fb4f70098626fd264d4babc Mon Sep 17 00:00:00 2001 From: Guillaume Smaha Date: Tue, 20 Mar 2012 10:03:43 +0100 Subject: [PATCH] Fix issue with IE and multiple scrollbars The issue appear when there are 2 scrollbars in the page. The main scrollbar isn't added automaticaly in $target.offset().top for IE (version < 9) Add to the current offset, the scrollTop value of window.document.documentElement fix the issue --- jquery.weekcalendar.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jquery.weekcalendar.js b/jquery.weekcalendar.js index 6d03c9f..96eb84c 100644 --- a/jquery.weekcalendar.js +++ b/jquery.weekcalendar.js @@ -1054,6 +1054,8 @@ $target.append($newEvent); var columnOffset = $target.offset().top; + if($.browser.msie && $.browser.version < 9) + columnOffset += window.document.documentElement.scrollTop; var clickY = event.pageY - columnOffset; var clickYRounded = (clickY - (clickY % options.timeslotHeight)) / options.timeslotHeight; var topPosition = clickYRounded * options.timeslotHeight;