Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

151
Visualizações
window moveTo placing window at half of the passed arguments in FireFox

I'm seeing some strange behavior with pop up windows on FireFox (93.0) on Mac, when trying to change the position of an opened pop up it places it at half the position I assign. For example, if I create a pop up window like this:

const test = window.open('assets/test.html', 'test', 'width=200,height=200,top=0,left=0')

It correctly opens a 200x200 sized window at the top left corner of my screen. If I check it's x coordinate in the console by entering test.screenX it correctly returns 0. Then if I try to move the window like this:

test.moveTo(300, 0)

...it places the window at 150 pixels from the left. I've confirmed this by printing test.screenX to the console which returns 150. Similarly, if I try test.moveTo(500, 0) then test.screenX will be 250, if I try test.moveTo(10, 0) then test.screenX will be 5, etc.

This does not happen in Chrome, where if I try test.moveTo(500, 0) then test.screenX will be 500 as expected.

Is this just a FireFox bug? Is there some way around this? The bug is consistent enough that I could target the browser and theoretically double the value if a user is on FireFox, but this feels like a very dangerous hack to me. Is there something going on here I'm missing or not understanding about pop ups?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda