azlists
unread,Jun 15, 2011, 8:11:57 PM6/15/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ModalBox
Hi !
I think there is a small problem on window resizing when chaining
multiple modal windows (wizzard style).
When having the first window being scrollable, the second modal
window does not automagically resise to fit content. The size is fixed
to the size of the first modal. This is true whether we use a fixed
height, or let the height be calculated automatically.
To reproduce the problem do the following :
var someLenghyListContainer = new Element('div', {'id',
'someLenghyListContainer'});
for(var i =0; i<100; i++){
var elemCont = new Element('div', {'id', 'elem'+i});
var elemTit = new Element('div', {'id',
'elemTit'+i}).update('TITLE OF ' +i);
var elemDesc= new Element('div', {'id',
'elemDesc'+i}).update('SOME LENGHY DESCRIPTION SO THAT WE HAVE
SOMETHING BLABLABLABLALBA OF ' +i);
elemCont.insert(elemTit );
elemCont.insert(elemDesc);
someLenghyListContainer.insert(elemCont);
}
someLenghyListContainer.insert(new Element('input', {'type':'button',
'id':'mySexyButton'});
Modalbox.show(someLenghyListContainer, { title: "My BIG LIST !! ",
width: 500,height : 600, afterLoad : function(){
Event.observe($('mySexyButton'), 'click',
function(){ Modalbox.show(someSmallContainer, { title: "My SMALL
Container !! "});
} //
click
);//observe
}//afterload
});
someLenghyListContainer is a DOM Element that contains a lengthy list
of elements in such a way that the modal needs to scroll.
mySexyButton is a button that is inside someLenghyListContainer . when
clicked a second modal pops.
someSmallContainer is a small DOM Element that should perfectly fit
inside the screen.
The expected behaviour would be to have the second modal animate to
resize to fit the small content. this is not the case (at least as
tested on FireFox 4.0.1 today) .
As side note also :
if height option is not set in the first modal (i.e. height : 600)
the automatic calculation of heigh is buggy as the last elements of
the list are not reachable because there is a scrolling problem ...
How can I fix this ?
Should I file an issue in github ?
Sorrrrrrry for the formatting ... ;-)
Many thanks in advance for your feedback !