Ticket #5067: patch.3.diff

File patch.3.diff, 1.4 KB (added by Erich Schmid <erichs@…>, 17 years ago)

Updated Patch, has now been tested on IE6/7, Firefox 2.0.0.6 and Safari 3.0.3 using the default admin view and a scrollable fixed positioned div (both scrolled and not scrolled)

  • 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        }
     77        // IE offsetParent does not include the top-level
     78        if (navigator.appName == "Microsoft Internet Explorer" && obj.parentElement){
     79            curleft += obj.offsetLeft - obj.scrollLeft;
     80        }
    7781    } else if (obj.x) {
    7882        curleft += obj.x;
    7983    }
     
    8488    var curtop = 0;
    8589    if (obj.offsetParent) {
    8690        while (obj.offsetParent) {
    87             curtop += obj.offsetTop;
     91            curtop += obj.offsetTop - obj.scrollTop;
    8892            obj = obj.offsetParent;
    8993        }
     94        // IE offsetParent does not include the top-level
     95        if (navigator.appName == "Microsoft Internet Explorer" && obj.parentElement){
     96            curtop += obj.offsetTop - obj.scrollTop;
     97        }
    9098    } else if (obj.y) {
    9199        curtop += obj.y;
    92100    }
Back to Top