I've got two links on the same page that open in modals using the class method. For some reason, whichever modal is opened first seems to dictate the width of the other modal, regardless of its setting. In other words, if I open the first dialog below (width:450), close it, and open the second one, then that dialog opens at a width of 450 as well (instead of the 900 that it is set to). If I open them in the opposite order, the 450 window opens at 900.
I'm not good with js, so not sure where to start with this. Any ideas would be appreciated.
<a id="node-126" class="simple-dialog bluebutton" title="Mailing list" rel="width:450;resizable:false;position: [center,100]" name="node-126" href="/mailing-list">Join the list</a>
<a id="footer-twitter-follow-button" class="simple-dialog sociallink twitter" title="Follow us on Twitter" rel="width:900;resizable:false;position: [center,100]" name="node-125" href="/follow-us-twitter">THE BIRD</a>
Comments
Comment #1
drclaw commentedThis should be easy enough to test. I'll give it a try and get back to you.
Thanks for the report!
Comment #2
sirnjeet commentedI have the same issue. I have 3 dialogs, once the first is opened (any of the three) Simple Dialog retains the details (height, width, CSS class) on subsequent calls. Looking at the HTML, I can see that the HTML container is updated on the first call, but it doesn't get reset to the pre-call state on close and further calls do not take up the options in the REL attrib on the anchor tag.
Another effect of this is that I've used this to display a flash video. On close the video keeps play, but you can't see it but you can hear it playing.
To prevent that, I created a small bit of script to wipe the HTML pulled from the target page on close, however the container remains un-touched. What I intend to do is to wipe the whole container using JQuery on close and reset to the pre-call state as an interim fix.
Comment #3
drclaw commentedThis was a weird one to figure out. Although the fix was pretty simple. =/
Anyway, none of the dialog options were actually being applied after the first dialog was opened, strangely enough. I fixed that so it should be working now. I've pushed the fix to the dev branch (it should be packaged up within the next 12 hours), maybe one of you here could give it a test?
@sirnjeet I added a close event handler for when the dialog is closed to clear any content in it. At first I was a bit opposed to the idea, but in the end I figured it's doing no harm since every time the dialog is opened, it's immediately wiped anyway with the ajax loader image. Give it a try, I think it might work just how you need it. ;-)
Comment #4
deardagny commentedInstalled and tested the latest dev and seems to be working fine now. Thanks for the update!
Comment #5
drclaw commentedGreat! Thanks for testing it out! =)
I'll push a new release shortly.