1

Window.Open() method in the following file is still opening the browser window in minimized mode, you still have to click the maximize button on the top right corner of the newly opened window to maximize it. It maximizes the newly opened window to almost full screen but not completely - maybe, 95%. I need to have it open in 100% size (with windows status bar still showing as in the image below).

You can try by clicking the Try it button after you open the following html file. I've tested on both Chrome and Edge:

<html>
<body>

<p>Click the button to open a new browser window.</p>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
    window.open('https://www.google.com', 'popup_name','height=' + screen.height + ',width=' + screen.width + ',resizable=yes,scrollbars=yes,toolbar=yes,menubar=yes,location=yes');
}
</script>

</body>
</html>

Desired size of newly opened window [with occupying the whole screen but desktop's status bar on the bottom is still visible]:

enter image description here

nam
  • 21,967
  • 37
  • 158
  • 332
  • Would you please consider making a simple fiddle to show what's happening as I'm able to open the full screen window – Sajal Preet Singh Oct 16 '18 at 16:52
  • @SajalPreetSingh Please click the maximize button on the top right of newly opened window and you should see a slight difference that it maximizes the window from 95 or 98% to 100%. You can also try the following [W3Schools link](https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_open) by copying the parameters I showed in the above file. – nam Oct 16 '18 at 16:57

1 Answers1

0

You can only provide your preferred window size to the new window. But, the OS decides what is the maximum/minimum size that the window can have. Maximising the screen might not be possible.

I believe this related question might help.