sizeToContent() help - Mozilla
This is a discussion on sizeToContent() help - Mozilla ; Ubuntu users and some OS/X users are reporting screens like this in my extension:
http://img74.imageshack.us/img74/232...roxyok1vu2.png
http://img215.imageshack.us/img215/6...roxyok2tg7.png
and writing comments like this at AMO:
"The UI is completely broken under OS X (the windows have to be resized to even see ...
-
sizeToContent() help
Ubuntu users and some OS/X users are reporting screens like this in my extension:
http://img74.imageshack.us/img74/232...roxyok1vu2.png
http://img215.imageshack.us/img215/6...roxyok2tg7.png
and writing comments like this at AMO:
"The UI is completely broken under OS X (the windows have to be resized to even see the validation buttons"
The first screenshot shows a that doesn't use sizeToContent(). The second screenshot shows a that *does* use sizeToContent(). Does sizeToContent() work only in certain cases? Mark Finkle in IRC recommended I try:
setTimeout( function() {sizeToContent();}, 0);
but since I have neither Ubuntu nor OS/X, I won't know if this fixes the problem. What should I do?
Thanks for any advice,
Eric
__________________________________________________ __________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i...Dypao8Wcj9tAcJ
-
Re: sizeToContent() help
Eric H. Jung wrote:
> Ubuntu users and some OS/X users are reporting screens like this in my extension:
>
> http://img74.imageshack.us/img74/232...roxyok1vu2.png
> http://img215.imageshack.us/img215/6...roxyok2tg7.png
>
> and writing comments like this at AMO:
>
> "The UI is completely broken under OS X (the windows have to be resized to even see the validation buttons"
>
> The first screenshot shows a that doesn't use sizeToContent(). The second screenshot shows a that *does* use sizeToContent(). Does sizeToContent() work only in certain cases? Mark Finkle in IRC recommended I try:
>
> setTimeout( function() {sizeToContent();}, 0);
>
> but since I have neither Ubuntu nor OS/X, I won't know if this fixes the problem. What should I do?
>
> Thanks for any advice,
> Eric
>
>
Recently sizeToContent was broken:
https://bugzilla.mozilla.org/show_bug.cgi?id=371508
This was fixed and made 3.0b5.
Maybe it wasn't fully fixed after all?!
(Assuming that this problem affects 3.0b+?)
Nils
-
Re: sizeToContent() help
Eric H. Jung pisze:
> Ubuntu users and some OS/X users are reporting screens like this in my extension:
>
> http://img74.imageshack.us/img74/232...roxyok1vu2.png
> http://img215.imageshack.us/img215/6...roxyok2tg7.png
>
> and writing comments like this at AMO:
>
> "The UI is completely broken under OS X (the windows have to be resized to even see the validation buttons"
>
> The first screenshot shows a that doesn't use sizeToContent(). The second screenshot shows a that *does* use sizeToContent(). Does sizeToContent() work only in certain cases? Mark Finkle in IRC recommended I try:
>
> setTimeout( function() {sizeToContent();}, 0);
>
> but since I have neither Ubuntu nor OS/X, I won't know if this fixes the problem. What should I do?
>
> Thanks for any advice,
> Eric
>
I guess, but probably some styles / bindings / overlays are applied to
content after you call sizeToContent() function. This function resize
window once, but not make it automatically resize to modified content.
> setTimeout( function() {sizeToContent();}, 0);
This will assure sizeToContent(); will be called just after window has
been constructed, with all styles, bindings and overlays.
If you create window with dynamic content, you may consider using
setInterval() with sizeToContent(), to make window dynamically adapt to
content. Even better is using some more sophisticated function to
animate size changes, and fade-out new content when window reaches new size.
I do something similar in my extension.
--
Arivald