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?