Ticket #10245: fix_firefox_scrolling_bug_with_tests.diff
| File fix_firefox_scrolling_bug_with_tests.diff, 2.7 kB (added by nik.wakelin, 7 months ago) |
|---|
-
test/functional/effects5b_test.html
old new 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 4 <head> 5 <title>script.aculo.us Effects functional test file</title> 6 <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 7 <script src="../../lib/prototype.js" type="text/javascript"></script> 8 <script src="../../src/scriptaculous.js" type="text/javascript"></script> 9 <script src="../../src/unittest.js" type="text/javascript"></script> 10 </head> 11 <body> 12 13 <div style="height: 200px;"> </div> 14 15 <h1>script.aculo.us ScrollTo effect (with floats) functional test</h1> 16 17 (this test only applies to Firefox) 18 19 <div style="float: right; padding: 10px; background: #ccc; height: 1900px;"> 20 21 <h2>top of float</h2> 22 23 <a href="#" onclick="new Effect.ScrollTo('bottom-of-float');return false;">scroll to bottom!</a> 24 25 <div style="height: 1500px;"> </div> 26 27 <h2 id="bottom-of-float">Bottom of Float</h2> 28 29 w00t 30 31 </div> 32 33 <script> 34 window.scrollBy(0, 200); 35 </script> 36 37 38 </body> 39 </html> -
test/functional/index.html
old new 35 35 <li><a href="effects3_test.html" target="test">effects3_test</a></li> 36 36 <li><a href="effects4_test.html" target="test">effects4_test</a></li> 37 37 <li><a href="effects5_test.html" target="test">effects5_test</a></li> 38 <li><a href="effects5b_test.html" target="test">effects5b_test</a></li> 38 39 <li><a href="effects6_test.html" target="test">effects6_test</a></li> 39 40 <li><a href="effect_shake.html" target="test">effect shake</a></li> 40 41 <li><a href="effects_grow_strink_test.html" target="test">Grow/Shrink</a></li> -
src/effects.js
old new 509 509 var options = arguments[1] || { }, 510 510 scrollOffsets = document.viewport.getScrollOffsets(), 511 511 elementOffsets = $(element).cumulativeOffset(), 512 max = (window.height || document.body.scrollHeight) - document.viewport.getHeight();512 max = document.viewport.getScrollOffsets[0] - document.viewport.getHeight(); 513 513 514 514 if (options.offset) elementOffsets[1] += options.offset; 515 515