Closed Bug 691693 Opened 10 years ago Closed 10 years ago

Window resizing from JS (moveTo, resizeTo, etc) doesn't work when Firebug is installed


(Core :: DOM: Core & HTML, defect)

Not set





(Reporter: paul.mcnamara, Unassigned)



User Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; .NET4.0E; .NET CLR 1.1.4322)

Steps to reproduce:

We have a web app that uses modal windows to allow drill down to records from a list. The page displayed by the popup window executes script to resize the window depending on the content. The window is opened using showModalDialog() and the resizing worked fine in versions prior to 7.

Actual results:

In Firefox 7 the resizing does not take place even though we "own" that window as we originated it from showModalDialog. 

Expected results:

Since version 7 still allows windows created by to be resized I think the same should apply to windows created window showModalDialog(). I'm aware that it's not a standard function but if it exists and can still be used it should obey the same rules as
Can you attach a testcase or point us to the URL where this web app can be tested?
Unfortunately it's an internal line of business app but I can probably knock up and example demonstrating the issue. Watch this space :)
Sure, just a minimal javascript how you open the window and resize.
Page text below. Open page1.html and click the link. It should resize to be 1000x200 once loaded.


<!DOCTYPE html>
<script type="text/javascript">

function OpenWindow(url, width, height)
	 var features = 'resizable:no;status:yes;dialogwidth:' + width + 'px;dialogheight:' + height + 'px;help:no';
     features = features + ';dialogtop:' + (window.screen.availHeight - height) /2;
	 features = features + ';dialogleft:' + (window.screen.availWidth - width) /2;
	 window.showModalDialog(url, this, features);

<a href="javascript:OpenWindow('page2.html',400, 400);">Open Me!</a>


<!DOCTYPE html>
<script type="text/javascript">

function Resize(width, height) 
	var availWidth = window.screen.availWidth;
	var availHeight = window.screen.availHeight;
	var top = (availHeight - height) / 2;
	var left = (availWidth - width) / 2;

	if (window.dialogHeight)
		window.dialogHeight = height + 'px'; 
		window.dialogWidth = width + 'px'; 
		window.dialogLeft = left; 
		window.dialogTop = top;
		var _win; 
		if(window.parent) _win = window.parent; 
		else _win = window;
		_win.resizeTo(width, height);
		_win.moveTo(left, top);

Resize(1000, 200);

<h1>Hello world!</h1>
It does work for me, on Firefox 7 and 10, Win XP. I see the window resizing from a smaller square size to the 1000x200px.
How odd. It works fine in IE9 but definately doesn't do it in FF 7.0.1. I've tried with both local files and hosted on a web server. It did work in 6.x so it must be related to the no resize change but it's odd it works for you and not me. Is it possible the current release is missing a fix that's in the head revision of the 7 branch?
Have you tried Firefox safe mode? ( Do you get any messages in Error console?

I have read about the change to Firefox you mention it seems to be bug 565541 and it should be in Firefox 7. I use the official one from
There is a story in bug 565541 about Firebug extension breaking window resize after this change. Do you have it enabled?
Blocks: 565541
Aha! Yes I do. Disabling Firebug does indeed solve the problem. Sorry for wasting your time.
(In reply to paul.mcnamara from comment #9)
> Aha! Yes I do. Disabling Firebug does indeed solve the problem. Sorry for
> wasting your time.

Thanks for double checking that. I've heard the Firebug team is working on fixing this. Hope it's not going to be too annoying for you guys. Luckily, regular users usually don't have Firebug installed ;)
Closed: 10 years ago
Component: General → DOM
OS: Windows 7 → All
Product: Firefox → Core
QA Contact: general → general
Hardware: x86_64 → All
Resolution: --- → INVALID
Version: 7 Branch → Trunk
Great. Per the comments in bug 565541 it will be solved in Firebug 1.9a4 soon.
Not a massive issue for us, although it's slightly ironic that it was affecting our in-house bug tracking system ;)
Duplicate of this bug: 691726
Summary: Firefox 7 removed the ability to resize windows not opened using (i.e. windows you don't "own"). However it also stops you if it was created using showModalDialog() which is beleive is a bug. → Window resizing from JS (moveTo, resizeTo, etc) doesn't work when Firebug is installed
Duplicate of this bug: 691956
Duplicate of this bug: 693151
Duplicate of this bug: 663824
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.