JavaScript moveTo(0, 0) not working in FireFox OS X
Friday, 15th January 2010Here’s a weird JavaScript FireFox bug…
In OS X, for some reason the following javascript was not positioning the FireFox browser window to the top left of the screen.
window.moveTo(0, 0);
Solution
Not sure what causes the problem but it seems to work find if you position the window 1 pixel lower.
window.moveTo(0, 1);


February 4th, 2010 at 3:27 pm
Thanks Ben, this was killing me, but your posting helped me. In my experience though, I had to set to (1,1) to get results. Thanks a bunch!
-aaron
September 27th, 2010 at 7:44 am
thanks for this Ben. It’s a weird one, but your solution works for me. The window is 1 pixel short of the top of the screen.
Thanks again.
December 11th, 2010 at 9:00 am
Oh, man… If only I found this article 4 hours ago… Thanks so much for the tip! Has anyone seen this in Mozilla’s Bug Tracker?
April 21st, 2011 at 8:47 am
Thanks a lot.
When trying to maximize a window, you have to set -1 on total width and height like this :
resizeTo(screen.availWidth-1, screen.availHeight-1)
If not doing this, moveTo(1,1) will not work