Window scrolling Javascript only work after the page is completely loaded (was working fine with Firefox v3.5.8)




9 years ago
8 years ago


(Reporter: khalidmajidali, Unassigned)



3.6 Branch
Windows XP

Firefox Tracking Flags

(Not tracked)




(1 attachment)



9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/ Safari/532.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)

The javascript ( executes properly only after page load. While it was working fine on all versions of Firefox before v3.6

I looked for help at ( but couldn't find any real solution. works great on Firefox v3.5.8 and all other major browsers including the buggiest Internet Explorer!

Please test this link ( using Firefox v 3.5.8 and v3.6+ and you'll know the difference.

Reproducible: Always

Steps to Reproduce:
1. Visit using Firefox v3.5.8
2. Then using Firefox v3.6+
3. Notice the page scroll error!
Actual Results:  
The script does not execute if it is called any where in the body. It only works if called in the body's onload attribute. But that means the the user will have to wait for the page to center until it is loaded completely!

Expected Results:  
The script should execute just after the body tag starts.

To get around this bug I used PHP to check the users browser version and execute the script on page load, here is what i did...

if (!strpos($_SERVER['HTTP_USER_AGENT'],'Firefox/3.6')){ echo '<body>'; } else { echo '<body onload="setPosition();">'; }

This made the page viewable after the page load at least. But it not how it should be. To view this result visit (

I also took screen shots of this page using Firefox v3.5.8, v3.6.2, Opera, Chrome, Safari and Internet Explorer... here is the link to the image (

Please look into this issue. It has caused me and a lot of my visitors a lot of trouble.


Khalid Majid (Web Application Developer)


9 years ago
Keywords: common-issue-
Version: unspecified → 3.6 Branch

Comment 1

9 years ago
Created attachment 438341 [details]
Error Screenshot

This is an image showing the screenshots of the webpage on all browsers!

Comment 2

9 years ago
it's not a problem on the trunk (Gecko/20100410 Minefield/3.7a5pre)

Comment 3

9 years ago
@Jo Hermans What does that mean?

Comment 4

9 years ago
(In reply to comment #2)
> it's not a problem on the trunk (Gecko/20100410 Minefield/3.7a5pre)
I mean what does it mean when you say that "it's not a problem on the trunk" ??
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.3a5pre) Gecko/20100410 Minefield/3.7a5pre

This was indeed a bug but it is fixed on trunk, in March of this year.
It is not impossible but also not likely that this bug will be fixed on the 3.6 branch. First step in the direction is a regression range (maybe two ranges) so that it becomes more clear what patch has caused the problem and what bug has fixed it. Then it is up to the drivers to decide if a patch will be accepted for Firefox 3.6. And last but not least, it needs also someone who is willing to create a patch. So a long road to go.

Comment 6

9 years ago
(In reply to comment #4)
> (In reply to comment #2)
> > it's not a problem on the trunk (Gecko/20100410 Minefield/3.7a5pre)
> I mean what does it mean when you say that "it's not a problem on the trunk" ??

That the bug is not present in the latest version used by the developers - it probably only exists on the 3.6 branch.

Comment 7

8 years ago
Khalid -> Are you still experiencing this issue with the latest version of Firefox 5?

Comment 8

8 years ago
Closing bug as Incomplete - if you are still experiencing this issue or have more information to provide feel free to post back here and we can re-open the bug. You can also get assistance by visiting the Firefox help site ->
Last Resolved: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.