6

I have some JavaScript that I use to make a window not resizable, something along the lines of:

window.open(URL, id, "resizable=no");

This works in most browsers but it appears to not be supported in Chrome. I have considered using JavaScript to watch for a re-size and set it back, but this is not ideal. Does anyone have any other suggestions? Thanks in advance.

Martyn0627
  • 741
  • 1
  • 4
  • 17
  • 1
    Looks like a known issue they have no plan on fixing: https://code.google.com/p/chromium/issues/detail?id=185425 – j08691 Mar 18 '13 at 15:19
  • 2
    Forcing window/tab sizes on users is quite pointless these days. Most modern browsers ignore stuff that might patronize the user, or at least have options to disable such features. – CBroe Mar 18 '13 at 15:19
  • OK thanks guys those links were useful, I think I will look at if it really does not to be a fixed size. – Martyn0627 Mar 18 '13 at 15:21

2 Answers2

14

This was easy to do with the old javascript with popups and a "resizable = 0" parameter a while ago, but current browsers do not allow this because they killed user's freedom. This initiative started with firefox and chrome followed him, probably the solution for this case is creating an chrome extension and that only works for chrome, but it seems a madness.

After some discussions, the consensus seems to be that window.open() should not be modified to parse "resizeable", at least at this time. The change would require modifications to Webkit, and the behavior would be inconsistent with Firefox and existing Webkit browsers.

see more here

We always allow a window to be resized, which is consistent with Firefox.

see more here

geoom
  • 6,279
  • 2
  • 26
  • 37
  • +1 - Both Chrome and FF (See: http://stackoverflow.com/questions/8216208/i-dont-want-pop-up-window-to-be-resizable#answer-8216251 ) are giving users the control over their browser windows. It's a good thing. – johnathankent Jul 28 '14 at 21:47
13

This is old school javascript. Modern browsers tend to not allow this because it is seen as a user unfriendly limitation.

hallvors
  • 6,069
  • 1
  • 25
  • 43