Skip to main content

Bug Tracker

Side navigation

#3518 closed bug (invalid)

Opened October 24, 2008 10:46AM UTC

Closed October 24, 2008 10:01PM UTC

Last modified October 27, 2008 08:14PM UTC

Opera does not correctly animate(offsetTop)

Reported by: fil@rezo.net Owned by: brandon
Priority: minor Milestone: 1.3
Component: offset Version: 1.2.6
Keywords: opera animate offsettop Cc: fil@rezo.net, flesler
Blocked by: Blocking:
Description

With this script the Opera brwoser goes first to the top (offsetTop 0) before aniamting to the correct location

Attachments (1)
  • opera_animate.bug.html (6.1 KB) - added by fil@rezo.net October 26, 2008 09:17PM UTC.

    same file with DOCTYPE

Change History (8)

Changed October 24, 2008 10:01PM UTC by flesler comment:1

cc: → fil@rezo.net, flesler
resolution: → invalid
status: newclosed

You need to animate just the body in order to make it work.

But... you're putting it into quirks mode. Add a correct doctype and try again, I think you'll need to use $('html') then to make it work properly.

Needless to say, you should use jQuery.ScrollTo for this. It should handle all different browsers (including versions) properly.

That is, as long as you add a proper doctype.

Changed October 26, 2008 02:33PM UTC by fil@rezo.net comment:2

The bug also appears when the DOCTYPE is set, see for example http://blog.mondediplo.net/2008-09-16-Freddie-Mac-Fannie-Mae-la-Chine-et-les

As for jQuery.ScrollTo I used it at first, with the same problem on Opera; that's why I went to a simpler code, in order to try and resolve this bug

Changed October 26, 2008 03:13PM UTC by flesler comment:3

I don't see where to click in that example.

Using the body in your initial demo does make it work.

jQuery.ScrollTo is tested with both transitional and strict doctypes, on IE 6 & 7, FF 2 & 3, Safari 3 and Opera 9.2 & 9.5. All on windows.

Changed October 26, 2008 09:13PM UTC by fil@rezo.net comment:4

OK but on (my) Opera Mac it first "jumps" to the top, then animates to the anchor. And the same problem happens with scrollTo

Changed October 26, 2008 10:47PM UTC by flesler comment:5

As I told you, once you add a doctype and put it out of quirk mode, you need to use html instead of body.

I tried your example and does what you describe, then put html and all went well. Tried last version of scrollTo and worked all too.

Changed October 27, 2008 06:21PM UTC by fil@rezo.net comment:6

OK version 1.4 of jquery.localscroll fixes it! I was with 1.3, sorry for the trouble

Changed October 27, 2008 06:40PM UTC by fil@rezo.net comment:7

Changed October 27, 2008 08:14PM UTC by flesler comment:8

Thanks, updated (that's not the real repository).