New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 2091 link

Starred by 90 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Sep 2008
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

  • Only users with Commit permission may comment.

Sign in to add a comment

window.resizeTo() doesn't have any effect

Reported by, Sep 11 2008

Issue description

Product Version      : 
Google Chrome (1798)
Official Build
Google Inc.
Copyright © 2006-2008 Google Inc. All Rights Reserved.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML,
like Gecko) Chrome/ Safari/525.13

URLs (if applicable) : <Code Snippet attached>
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
     Safari 3: OK
    Firefox 3: OK
         IE 7: OK if opening in a new window.

What steps will reproduce the problem?
1. Copy the following snippet to a file, sample.html. The script is
supposed to open a html of size : (100, 200)
  <script TYPE="text/javascript" LANGUAGE="javascript">

2. Open the file

What is the expected result?
When the above html, sample.html is opened, the window should get resized
to the specified value.

What happens instead?
A Chrome window opens but does not get resized.

Additional Information
If a IE7 window is already open, sample.html might be opened as a new tab
in the 'already open window'. In that case, even in IE7 it doesn't get resized.
Status: WontFix
By Design we don't support resize/move for tabs, only constrained windows.

Its not related to resize of individual tabs, instead its for the constrained window

Modified Test Case :

1. Close all browser instances.
2. Open the attachment, sample.htm, which is supposed to open a window of size(100, 200)

Expected Result :
A browser window should be opened and resized to the specified size.

What happens instead:
A browser window opens, but doesn't get resized.

Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
     Safari 3: OK
    Firefox 3: OK
         IE 6: OK 
         IE 7: OK, if opening in a new window.
114 bytes View Download
Resizing won't work for top-level tabs, and when you open sample.htm it's opened as a 
top-level tab.  If you instead opened it as a pop-up (for example using 
with a width and a height set), resizeTo should work.

Comment 4 by, Jan 5 2009

ResizeTo doesn't work for popups using either. Why don't you try it?
I have this exact same problem. Chrome and Opera both FAIL to resize the top-level 
application window. I understand the justification for preventing other tabs from 
resizing the main window and affecting other tabs. But why not allow resizeTo when 
there are no other tabs ? That would a simple fix and still preserve the original 

Google team: please implement window.resizeTo for the top-level window, not just 

Comment 6 by Deleted ...@, Apr 2 2009

For what's its worth, I repeat the request made in comments 3, 4, and 5. If opening a
top-level application window why break the behavior in IE or Firefox and ignore the

Google team: please implement window.resizeTo for the top-level window, not just 

Yes google team, please allow window.resize to work for the top-level window. I am 
developing a video monitoring solution application and I need the app to be able to 
automatically resize and move itself to a preferred location. It works fine with IE and 

It would be nice to get it to work since google chrome is very lightweight and allows 
web apps to have shortcuts on the desktop, start menu, quick launch w/out any toolbars 
or tabs.  
 Issue 14789  has been merged into this issue.

Comment 9 by Deleted ...@, Aug 17 2009

Google team:

Please allow window.resizeTo to work as intended, including top-level window if it is
the only window open.

If I implement an app using Chrome and my users open it, I fully expect it to open
and resize to the specified window dimensions that work and look best with my app.

Comment 10 by, Nov 30 2009

Another vote to fix this issue as suggested in the comments

Comment 11 by Deleted ...@, Dec 13 2009

I vote for this also

Comment 12 by Deleted ...@, Dec 22 2009

Oh dear PLEASE DON'T do this!  Nasty little invasive web designers keep trying to grab 
my screen-estate.  If you have to do it, put in a way of defeating it.
This needs to be possible to enable. When developing for a screen resolution it's crucial 
to be able to resize a window to certain size. It's fine if you allow a preference to 
override it but it needs to be here.

Comment 14 by Deleted ...@, Feb 26 2010

Hi Please implement this asap. This is functionality help us many ways.

Comment 15 by, Feb 28 2010

I think it's important to reinforce that moveTo needs to be in the fix for this as well.  
No half-measures please.

Not having this is a huge barrier to adopting Chrome over Firefox as it breaks all of 
my window positioning bookmarklets.

While there are Chrome extensions to allow for resizing, there are none that will 
move the window at the same time.  It's absolutely critical to be able eval the 
javascript to do both of these things directly from the location field to enable 

How else can developers manage their screen real estate _and_ target particular 
window sizes for projects they're working on?

I'm fine with allowing it to be specified as a preference to be enabled or disabled at 
will (even for it to be disabled by default).  The vast majority of users won't know or 
care what it does.

Can this issue be revisited? resizeTo and moveTo are invaluable for me for use in bookmarklets.

Comment 17 by, May 27 2010

I use resizeTo() as a developer for testing.

I use resizeTo() and moveTo() bookmarklets as a user to arrange my windows on multiple monitors, to quickly 
arrange 2 windows side by side for a document comparison.

Preventing resizeTo() and moveTo() on a single tab window (on a browser that only supports tabs) takes 
control away from the user and forces developers to use OS scripting to resize for testing.

Please allow users the option to control our browsing experience.

Please allow resizeTo() and moveTo() on a single tab window.

Has this been fixed yet? I need it for testing purposes.

Comment 19 by, May 28 2010

thesplatzone, this bug currently is set as status "WontFix", in other words the dev team is making a conscious 
choice to ignore the request. They evidently disagree resizeTo() and moveTo() should exist except for popups 

Comment 20 by Deleted ...@, Jun 24 2010

If Chrome dev team  wont  functions resizeTo() and moveTo() to work only for popups Why dont't work in --app mode. This mode is like popup?

Comment 21 by Deleted ...@, Jul 11 2010

Please sort this out. its an issue that is causing me a lot of headaches.
I need to size of the window to not go below a certain amount.
Sort this out now, or I will be forced to stop people from visiting my site with chrome and suggest, what must be at this point an upgrade, to Firefox or Internet Explorer.

Thank You

Comment 22 by Deleted ...@, Jul 30 2010

+ 1 vote for window.resizeTo 

Comment 23 by Deleted ...@, Aug 19 2010

For a part in my app the browser has to moveTo(0.0) and resizeTo(width, height) of the current browser. Why is this not supported in Chrome?

Comment 24 by, Aug 29 2010

At least do some feature that suggests to the user that the web site wants to resize. That way he will have control and will know that resizing is needed.
rather than saying WontFix, you could create a command-line flag to allow websites to use resizeTo and moveTo (for the use cases listed here)
I am yet another developer that is still required to develop to 1024 x 768. I now test in chrome last (if at all) so that I can use Firefox or IE as a guide for resizing my window. It's a huge waste of my time and interrupts my workflow. I think deciding to not support resizeTo in any way is retarded. At least allow for users to disable script from resizing their window as a CHOICE. You ask them if they would like chrome to stop any further alert dialogs from popping up, why is this different?
@24: Workaround suggestion.
1. Try .resizeTo
2. detect* if it worked. If not, display a help text "Please resize to a bigger browser window"

Moving/resizing could trick a user to click where they didn't intend to, and this is probably the reason why this will never be implemented, perhaps not even for appmode windows.

*For detecting if resizing worked you might need to consult
This is insane. Why break something that works in Safari and Explorer? Particularly if the web page is currently the only tab open? 

(Perhaps for multiple instances, throw an error message that a web page tried to resize the window but Chrome cannot do so with multiple tabs open.)

Basically, we have a need to open a window with embedded Flash content from a DVD and resize it to fit the Flash content exactly (Flash occasionally shows bit of stuff outside the embedded area that appear offstage if the window is larger.) I now have it working correctly for every browser except Chrome... congratulations on being the odd man out?
There is an extension called "Resolution Test" that works with Chrome 6:

(I should clarify -- this extension allows you to resize the window to a specific size (useful for web development). The window.resizeTo() function might or might not be used to accomplish this, I'm not sure... If not, the bug remains.)

Comment 31 by, Oct 12 2010

Under the Hood -> Content settings -> JavaScript

There should be options about which javascripts enable/disable (for ex. resizing or moving the window).
I think that this need be enabled by default when you make a Desktop Icon (chrome application).
+1 for this issue.

I'm a developer, and in our current project we've implemented a ton of automated browser tests using Selenium RC. Quite a few of those tests specifically test that e.g. a particular resolution shows specific elements of the UI or that a certain element needs to be scrolled to. To accomplish this, we run e.g. window.moveTo(0,0) and window.resizeTo(1024, 768), and then test whether the elements are in the viewport.

We currently can't automate these tests for chrome, since those don't work.

Comment 34 by Deleted ...@, Oct 22 2010

I vote for window.resizeTo be available on a parent window!

@mikko.koponen window.resizeTo works fine if the chrome instance is a new window  example here

So you only have to hack your Selenium script to open a new window on start.

Comment 35 Deleted

But unless I misunderstand, this presupposes all your clients have installed
said extension? For my purposes, this is still pretty unacceptable, alas.

I'm still strongly in favor of Google loosening the window.resize
restrictions to at least allow window resizing if only one tab is open. But
hey, they just broke self.close too in the OS X version of Chrome
7.0.517.41 (can't verify for any other OSen) so maybe I'll just have to stop
using/attempting to support Chrome altogether for a while. :-/
+ 1  for this issue.
My suggestion is:

This method can be applied to:
1. Chrome desktop application;
2. Window popup (;

And not can be applied to, for instance:
1. For global use (example: on enter on a website);

This method can be optional in Google config.


Comment 39 by, Dec 6 2010

Please understand that all further discussion of this topic is a waste of time.

Most Google Chrome feature requests are reflexively marked "WontFix" and, from what I have observed, are ignored completely (if you're lucky) or (if you're not) result in rude replies from developers with a pathological need to show you how much more they know about what you need from a browser than you do.

That said, "+1 Me too!". I really can't believe that "install yet another extension" is considered a good answer.

Comment 41 by Deleted ...@, Jan 6 2011

So more than two years of begging and no change? Guess what? No one here will be using it! Thanks for listening (and ignoring developers world-wide from your bubble in isolation land) Google!
Based on comment 3, resizeTo should work for popups. I tried it does. If it doesn't for you put it in a timeout in the onload of the popup and try.

Comment 43 by Deleted ...@, Jan 26 2011

I make an application that will be opened only from a site that I have no control over..

This site open every links in a popup 800x600.

So everytime you open my application, it will be 800x600..
Since my app take the whole page, the user need to resize the window to full size.
To save a step, i thought it would be nice to resize this popup  


It work well over Firefox, Safari, Netscape Communicator, and even IE7, IE8, IE9

It just doesnt work on Opera and Chrome... So Opera we don't care but Chrome is supposed to be the best...

Well, if its a popup from the main window (not the main window itself), resizeTo should work.
For example, try this html snippet (name it test.html so that it opens itself in a popup) -

<body onload='resizeTo(200, 200); moveTo(300, 300)'> 
	<button type=button onclick='"test.html", "whatever", "height=600, width=800")' >Open and resize popup</button>

You will see it resize and then move just fine.

Also unrelated, but might come handy, keep an eye on  Issue 16735

Comment 45 by, Feb 22 2011

Hey Folks, I need this feature as for a work around to another problem with chrome :(

Comment 46 by, Mar 6 2011

Could we have a setting in Options to allow access to the parent window?
This chat never will go end. And this feature never will be implemented. I'm wrong? Prove :)

Comment 48 by, Mar 7 2011

It's amazing how dozens of people can ask for something and the answer is always along the lines of "wontfix: nobody wants it". I have no intention of proving anything to #47, only to note that this feature is much requested. A setting that defaults to the current behavior, but gives those who want/need this feature the ability to enable it, would be most welcome. But as #47 points out, it will never be implemented. Talking to the Chrome developers is like talking to yourself.

Except that you don't always get a vicious and dismissive answer when you talk to yourself.

Comment 49 by Deleted ...@, Mar 8 2011

I totally agree with #39, #41 & #48.

I like Chrome, but this and the growing number of other 'WontFix' may cause me to rethink.
Well, go to the points:

- (Negative) Offer this feature to website is nonsense and unsecure, can be uncomfortable, for instance, if you generate a window and make this 'run' from mouse cursor and avoid that newbie users close by use moveTo();
- (Positive) Allow users apps (make by use Control -> Tools -> Make app) to prevent, for instance, the window to be smaller than defined by webapp. I have this problem.

So, I think that this feature be allowed only to webapp. An user that install a webapp need to know what he is doing.

Comment 51 by, Mar 10 2011

i need this resizeTo work since it is in the HTML / JavaScript specification. A user should be able to disable it, but it should be enabled by default for compatibility with existing browsers. For security resizeTo should not allow the window to be shrunk past a useable size, or expanded past a reasonable size without a dialog being presented to the user to approve such behavior.
Hack from #44 to resize on popup no longer works. Chrome seems to disregard all resizing now. disappointing there is no way around this...
my god ,until now ,google haven't add this function ,i don't know why? 

Comment 54 by, Jun 12 2011

@#51, resizeTo is not part of ecma script. See 

It's just a vendor specific thing and the big google decided not to support it. 

It's, however, expected to work and I don't see a problem by just asking the user if the window can be resized by a script or not. I is asking me if I really want to load a java applet...don't see a big problem here. 

At least for chrome application shortcuts. We have a point of sale window that cannot cover another application that rests on the bottom of the screen. 

Comment 56 by, Jul 20 2011

I agree,
We need to (at least) be able to set the window size through command line parameter(s).

+ 1  for this issue.
I really need this to work. Other browser do..

Comment 58 Deleted

browser resizing should be allowed to provide better UI
Google Team: Please, enables window.resizeTo for top-level windows.
Need a command-line switch to open a new window in "pop-up" mode where resize is allowed, or a setting to allow resizeTo to work.  I can't since the newly-opened window can't be attached to for remote diagnostics.  I need to be able to open a window at a given size from the command line, or enable resizing from the command line, or something.

Another developer here needing support for resizeTo(). Using selenium.webdriver/ screenshot functionality on multiple resolutions. Chrome was the fastest in running the tests and fortunately supported webdriver's save_screenshot() method. However if I can't take a screenshot in a desired resolution, chrome as a test browser has become completely useless.
I agree with #62 (also we are using webdriver). For me is enough to implement this in chromedriver or as a command line option.
I would agree with that, support only in chromedriver would be perfect! For what it's worth I solved this problem by having my API start a driver by doing a to the desired size, then switch_to_window and close the old window. Chrome still supports resizeTo in popup windows so my whole test just runs in a 1024x768 popup.

Comment 65 by Deleted ...@, Sep 25 2011

New to this site and haven't read all of the comments but
I can indeed move/resize/etc. Chrome but the effect only
lasts for about 3-4 initiations. Using Windows 7 on a 
Dell 4066. Hope this helps.
@65 this thread is about the webdriver or javascript interface to chrome in native windows, not popups. It doesn't matter what pc or windows you're running. Your post would be more helpful if you gave chrome version and a code sample to illustrate you success.!!!!

Comment 67 by Deleted ...@, Oct 12 2011

When I enabled google chrome frame in IE, the resizeTo didn't work either.

Comment 68 by Deleted ...@, Oct 16 2011

Also not working here, when opening the Cisco Networking Academy curriculum the Quiz window goes bizerk and re-sizes to the correct size then re-sizes back

Comment 69 by Deleted ...@, Oct 22 2011

it would be great if it could be an option to the Chrome user to allow/disallow the window.resizeTo()
Also needed for Selenium 2 / Webdriver use
@70: Not really needed for WebDriver - we're in the process of adding this to the API (see

Comment 72 by Deleted ...@, Mar 28 2012

pls cc me 

Comment 73 by Deleted ...@, Apr 26 2012

resizeto() is not working.
Wow Google. Pathetic.

"+1 Me too!"

Comment 75 by Deleted ...@, Jun 1 2012

chrome sucks
@75 Chrome is a very good browser, but need a better attention about issues, only.
It's been 4 years and the status is still "Won't Fix", come on! Not being able to resize popups can't be "by design"!
As a side note, this breaks CKEditor popup windows, which work in any other browser
TinyMCE javascript HTML editor uses resizeto quite extensively for its popup editing windows. The popup opens with content, gets focus and resized but then instantly loses focus and put in a full-size window. Works in all other browsers. I use the editor in a CMS application so must either comment out all calls to resizeto and try and analyse the effects (the code is fairly complex) or recommend users to not use Chrome. Shame really. 

Comment 80 Deleted

...following on from my comment above #79, Chrome: window.resizeto method does exist, it doesn't do what you expect it to so what's the point in that? TinyMCE uses this code to try to get round it but it doesn't work, of course:

				try {
					win.resizeTo(width, height);
				} catch(e) {
					// Ignore

if chrome got rid of the non-functioning resizeto method then we could use this kind of error checking successfully at least?

Comment 82 by, Jul 12 2012

Time for google to come clean. Google don't like pop up so there not going to support them, it tabs or nothing for them. Time you gave the world a chance to keep up and give these open source boys a little push in the right direction. CRTL click works fine, so please just publish a fix for these editors which pop tabs instead of windows. If your gonna be a dictator at least give some direction.

Comment 83 by Deleted ...@, Jul 12 2012

It seems that the latest beta release (21.0.1180.15 beta-m) allows pop ups to work.  I use CKEditor and first noticed pop ups not working when Chrome 18 was released and CKEditor popup window stopped working.  At that time, Chrome 19 beta allowed the opo ups to work so I switched to the beta release.  It then stopped working again in version 20.  Lets hope this is a permanent fix this time...
@82 Google does like popups because it detracts people from clicking on their adverts, thus damages their advertising revenues.

So much for open source eh? Just another monopoly abusing their power in the market place!

We are Google, do what we say. Your opinion does not count.
@84 Ok... Really is strange you have a free browser, like Chrome. I belive that Chrome will create new feature Chrome-ready-only to own market, like IE created when it is on top. But I don't think that popups will harm Google with ads.

Comment 86 by Deleted ...@, Aug 6 2012

Fix this bug now

Comment 87 by Deleted ...@, Aug 28 2012

Fix this bug now

It's not a bug, it's a very nice decision IMO. It's basically wrong to resize user window.
You've never tried to write a nice HTML launch page into a Flash app
embedded in a web page for CD/DVD/Flash distributed content, have you?

It's a very nice option to not have to generate a huge-ass default size web
page that says "CLICK HERE TO LAUNCH THE FLASH APP", which is basically
what Chrome is forcing those of us in this situation to do. Because, unlike
all the other browsers, in Chrome you can't guarantee a nicely resized page
that presents the Flash embed exactly as you designed it to be presented.

Why not Chrome too? They're still the odd man out on this one AFAIK.
Project Member

Comment 90 by, Oct 13 2012

Labels: Restrict-AddIssueComment-Commit
Owner: ----
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.

Comment 91 by, Feb 17 2017

 Issue 2709  has been merged into this issue.

Sign in to add a comment