PDA

View Full Version : 1.0a3 Ext.MessageBox.confirm sizing weirdness in FF



neongrau
12 Mar 2007, 3:16 AM
i put some html formatted text as the second argument to the confirm, and with that i saw some weirdness...

first time the confirm is used, it works as expected, second time the width is much smaller causing the text to wrap and the last part of the text gets cut off.

i was able to workaround it by making sure all text is wrapped in an inline element (span).

this only occured to me in FF but see for yourself:

paste this line into Firebugs console:

function testconfirm() { Ext.MessageBox.confirm('title','some longer sample text to allow the text to wrap somehow, and now some block elements...
<ul> one two[/list]'); }

then call it:

testconfirm()

should look fine the first time, but again:

testconfirm()

the confirm looks broken now.

and for some free extra weirdness try this :wink:

testconfirm();testconfirm()


try again by wrapping the <ul>[/list] in the example function with a <span> then it'll work in FF too

neongrau
12 Mar 2007, 3:23 AM
of course you have to open a page where the current Ext is loaded first.
so before trying with Firebug just open up http://www.yui-ext.com/deploy/ext-1.0-alpha3/examples/dialog/layout.html for example

jack.slocum
12 Mar 2007, 11:08 PM
Block Elements are not supported unless you plan on specifying a width. To specify a width, you'd have to use show().

neongrau
12 Mar 2007, 11:35 PM
hi jack!

ok i guess i couldn't know that.
but wouldn't it make sense to have the dialog add it's text into a span by itself?
just to make sure it can't happen by accident.

jack.slocum
13 Mar 2007, 3:26 AM
The problem is block elements auto expand to full container width and make it impossible to determine the width of the text.