Closed
Bug 439323
Opened 17 years ago
Closed 4 years ago
sizeToContent() not always working
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: frisco82, Unassigned)
References
Details
(Keywords: regression)
Attachments
(3 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9) Gecko/2008052906 Firefox/3.0
I am a extension developer and I got a bug report for this, I thought that I was not calling sizeToContent() in some situation but it seems FF3 has some problems with setting false and element in XUL and resizing as it does not resize correctly.
I have tested adding it to a setTimeout to see if that helps and nothing.
Reproducible: Always
Steps to Reproduce:
1. Install Foxgame (probably it can be found a minimal case but this is what I have) from http://www.foxgame.org/foxgame.xpi
2. Open Tools -> Add-ons -> Foxgame Options.
3. Select 4 tab "Messages"
4. In the bottom click on Add, and in the new dialog check "From"
Actual Results:
The from textarea is shown but the window is not resized even after a window.sizeToContent() call.
Expected Results:
It should have resized the dialog.
If after that you select "Spy Report" it resizes without problem, but not only that, if you select back "PM" now checking/unchecking resizes as it should.
I have tried it on a FF3 RC2 protable clean installation, my reports are that this happens in RC1 and RC2 but I have not tested it on other version / OS.
Reporter | ||
Comment 1•17 years ago
|
||
It's the code of the dialog giving problems, it is not working as is as it uses DTD-entities and external javascript files, but removing calls and entities should show the same behavior.
Comment 2•17 years ago
|
||
Comment 3•17 years ago
|
||
This was caused by Bug 300030.
Blocks: reflow-refactor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → Trunk
Comment 4•17 years ago
|
||
I've seen the same issue while working on the Firefox extension FoxClocks. Previous release versions of Firefox (<= 2.x) are unaffected.
To reproduce: call window.sizeToContent() where no resizing is necessary - subsequent calls to window.sizeToContent() then fail. Thus the behaviour can seem intermittent. (Corollary: workaround is to call window.sizeToContent() only when resizing will occur, e.g. on hiding/unhiding an element.)
The workaround doesn't seems to work in all cases either. I call sizeToContent once ever in the beginning of my javascript and it makes the window as small as possible making the entire page disappear. The window has plenty of content at that point and should have resized. Was introduced in FF3 as it works fine in FF1&2
Updated•17 years ago
|
Summary: sizeToContent() not allways working → sizeToContent() not always working
Comment 6•17 years ago
|
||
Some of our users confirm this as well:
http://bugs.code.downthemall.net/trac/ticket/731
Was supposed to be fixed by: bug 371508
Comment 7•17 years ago
|
||
This bug breaks the popup window feature of my extension, Text-to-Image, on Windows XP, Windows Vista, and Linux (Firefox 3.1 builds only).
In either case, a zero height/width popup is created that is either invisible, unresizable, or only as large as the window header.
Comment 8•17 years ago
|
||
If sizeToContent is called when the size already fit to the content, then all next calls to sizeToContent will not work.
If you get ride of this test :
http://mxr.mozilla.org/mozilla-central/source/xpfe/appshell/src/nsXULWindow.cpp#1714
sizeToContent has the correct behavior.
I don't know why, but I think we are on to something.
Comment 9•17 years ago
|
||
Open this xul dialog page :
Click on hide, then show, then hide, then show, ... it works.
But click twice on hide or show, it stops working.
Comment 11•16 years ago
|
||
Seems to work know. Resolved ?
Comment 12•16 years ago
|
||
Yes, it seems to work for me in current trunk build with the testcases.
However, the FoxGame extension gives me problems trying out if it works there. I get js errors in the error console, so I can't really test the extension.
Paul, you mean this seems to work now that bug 465448 is fixed?
Comment 13•15 years ago
|
||
Still broken:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Comment 14•14 years ago
|
||
Since 7.0b1 candidate .resizeBy is also broken, and it's always!
Nothing in dev toolbar or firebug.
Comment 15•4 years ago
|
||
Closing this as Incomplete since its been a long time since the last update on this issue and there is no reachable test case to investigate this further.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•