JavaScript moveTo(0, 0) not working in FireFox OS X

Friday, 15th January 2010

Here’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);


Not sure what causes the problem but it seems to work find if you position the window 1 pixel lower.

window.moveTo(0, 1);
extract is a 100% natural and pure green coffee extract

4 Responses to “JavaScript moveTo(0, 0) not working in FireFox OS X”

  1. Aaron Klump Says:

    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!


  2. Craig Says:

    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.

  3. Steve Says:

    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?

  4. Mika Says:

    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

Leave a Reply