window.open width ignored in Chrome window.open width ignored in Chrome google-chrome google-chrome

window.open width ignored in Chrome


it would seem to be some bizarre quirk in Chrome, that you have to specify both a width and a height to get it to observe the dimensions set. If you only specify a height, or a width, then that single dimension is ignored. Hence why in the other answer it worked fine for Jeff.


I have tried to put this one on Chrome version 25.0.1364.172

window.open('','','width=200,height=100');

and it correspond the exact height and width of the window.

to check, please use

window.innerHeight; //to display heightwindow.innerWidth; //to display width