This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

ابحث في الدعم

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

window.resizeTo in addon (overlay commonDialog) does not resize after some minimum size in FF v17 & 18

  • 4 ردود
  • 2 have this problem
  • 1 view
  • آخر ردّ كتبه oster

more options

I created an addon which overlay commonDialog.xul. In the load event, window.resizeTo is called and set to a very small size (like 10x10) so it is almost invisible to users.

This works fine in FF 15. After upgrading to FF 17 or FF 18, this stops working.

When I set the size big, it works fine. When setting it to a small size, it seems like when hitting a limit, the window size stays the same. The window size is the same when setting to 10x10 or 100x100.

This is on a MAC, but same behavior is observed on Windows too.

It seems like there is a minimum size predefined and the window does not get smaller than that.

Aren't we supposed to be able to resize the window as we wish in the addon?

I created an addon which overlay commonDialog.xul. In the load event, window.resizeTo is called and set to a very small size (like 10x10) so it is almost invisible to users. This works fine in FF 15. After upgrading to FF 17 or FF 18, this stops working. When I set the size big, it works fine. When setting it to a small size, it seems like when hitting a limit, the window size stays the same. The window size is the same when setting to 10x10 or 100x100. This is on a MAC, but same behavior is observed on Windows too. It seems like there is a minimum size predefined and the window does not get smaller than that. Aren't we supposed to be able to resize the window as we wish in the addon?

Modified by oster

All Replies (4)

more options

Did you try to use CSS code to set a height and width to that window or set a height and width property?

<?xml-stylesheet href="chrome://xxx/xxx.css" type="text/css"?>

If you use an extension then you can also hide that window until it is needed.

more options

Hi Cor-el,

I tried with CSS but that is not what I want. CSS impacts all commonDialog. What I need is for the dialogs meet my criteria only.

Can you elaborate on how I can hide the window in the extension and show it as needed?

more options

If you create your own window with a unique ID then it should be possible to create more specific CSS rules for that window.

How (when) do you resize that window when you need it to show with the default dimensions?


If you have specific questions about developing extensions then it is best to ask advice at the MozillaZine Extension Development forum.

The helpers at that forum are more knowledgeable.
You need to register at the MozillaZine forum site in order to post at that forum.

more options

The window is the http authentication popup window and is not opened by me,

I listen to the load event and when called, if it matches my criteria, then window.resizeTo is called to change the size.

This works in FF 15, but not 17 or 18. Is this a firefox breakage/bug?