Changeset 505

Show
Ignore:
Timestamp:
01/15/06 06:45:35 (3 years ago)
Author:
therve@gmail.com
Message:

OK scrollTo should work now.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • mochikit/branches/scriptaculous/MochiKit/Effects.js

    r504 r505  
    642642            offsets[1] += this.options.offset; 
    643643        } 
    644         var max = window.innerHeight ? 
    645             window.height - window.innerHeight : 
    646             document.body.scrollHeight - 
    647                 (document.documentElement.clientHeight ? 
    648                     document.documentElement.clientHeight : 
    649                     document.body.clientHeight); 
     644        var max; 
     645        if (window.innerHeight && window.height) { 
     646            max = window.innerHeight - window.height; 
     647        } else if (document.documentElement && 
     648                   document.documentElement.clientHeight) { 
     649            max = document.documentElement.clientHeight - 
     650                  document.body.scrollHeight; 
     651        } else if (document.body) { 
     652            max = document.body.clientHeight - document.body.scrollHeight; 
     653        } 
    650654        this.scrollStart = MochiKit.Position.deltaY; 
    651655        this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart;