Demonstrates a problem with Scriptaculous' ScrollTo Effect and floats in Firefox, to wit:

In Firefox only, when you have floating elements, the ScrollTo effect goes to the top of the page, regardless of it's explicit target. The problem is that the value of document.body.scrollHeight, which is used in the calculations for Effect.ScrollTo, returns very tiny values when the page elements are floated, resulting in a scroll to 0 or to a negative number.

Everything seems to work just fine in IE 6, and IE 7, and Safari. Not tested in other browsers.

UPDATE: As of 1/21/2008 This can be fixed by applying the patch found here: http://dev.rubyonrails.org/ticket/10245. This does NOT appear to have been applied to the released version of Scriptaculous, which is 1.8.1 as of this writing (10/16/2008).

TOP

*from Effect.ScrollTo in effects.js, line 514
max = document.body.scrollHeight - document.viewport.getHeight();


float me un-float me

go to 'target' using ScrollTo effect

























































































TARGET

go to 'top' using ScrollTo effect