Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#3518 closed bug (invalid)

Opera does not correctly animate(offsetTop)

Reported by: fil@… Owned by: brandon
Priority: minor Milestone: 1.3
Component: offset Version: 1.2.6
Keywords: opera animate offsettop Cc: fil@…, 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@… 11 years ago.
same file with DOCTYPE

Download all attachments as: .zip

Change History (9)

comment:1 Changed 11 years ago by flesler

Cc: fil@… 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 11 years ago by fil@…

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 11 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 11 years ago by fil@…

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 11 years ago by fil@…

Attachment: opera_animate.bug.html added

same file with DOCTYPE

comment:5 Changed 11 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 11 years ago by fil@…

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

comment:8 Changed 11 years ago by flesler

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

Note: See TracTickets for help on using tickets.