Ticket #5067: patch.diff

File patch.diff, 889 bytes (added by erichs@…, 17 years ago)

patch of core.js to cater for scrolling when calculating positions

  • Users/erichs/Documents/eclipse/django/django/contrib/admin/media/js/core.js

     
    7171    var curleft = 0;
    7272    if (obj.offsetParent) {
    7373        while (obj.offsetParent) {
    74             curleft += obj.offsetLeft;
     74            curleft += obj.offsetLeft - obj.scrollLeft;
    7575            obj = obj.offsetParent;
    7676        }
    7777    } else if (obj.x) {
     
    8484    var curtop = 0;
    8585    if (obj.offsetParent) {
    8686        while (obj.offsetParent) {
    87             curtop += obj.offsetTop;
     87            curtop += obj.offsetTop - obj.scrollTop;
    8888            obj = obj.offsetParent;
    8989        }
    9090    } else if (obj.y) {
Back to Top