Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#3518 closed bug (invalid)

Opera does not correctly animate(offsetTop)

Reported by: [email protected] Owned by: brandon
Priority: minor Milestone: 1.3
Component: offset Version: 1.2.6
Keywords: opera animate offsettop Cc: [email protected]…, flesler
Blocked by: Blocking:


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 [email protected] 14 years ago.
same file with DOCTYPE

Download all attachments as: .zip

Change History (9)

comment:1 Changed 14 years ago by flesler

Cc: [email protected] flesler added
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.

comment:2 Changed 14 years ago by [email protected]

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

comment:3 Changed 14 years ago by flesler

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.

comment:4 Changed 14 years ago by [email protected]

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 14 years ago by [email protected]

Attachment: opera_animate.bug.html added

same file with DOCTYPE

comment:5 Changed 14 years ago by flesler

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.

comment:6 Changed 14 years ago by [email protected]

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

comment:8 Changed 14 years ago by flesler

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

Note: See TracTickets for help on using tickets.