I disagree. I have ran into this problem countless times. Dialogs are often filled with remote content, and several times I load images in the dialog. I want the dialog to pop up instantly so it can be more responsive to the user. But once the browser downloads the image, the dialog is re-sized and also as a result way off center and the user has to drag the dialog to the center just to read it.
On Dec 11, 5:11 am, Scott González <[email protected]> wrote: > There's currently no way to re-position a dialog through the dialog > API. This doesn't seem like an intuitive feature - the developer > should only set the opening position, and only the user should move it > afterward. You could manually calculate the position yourself and > just set the top and left style properties if you really want to do > this. > > As for swapping out the HTML of the dialog while it's open, I can't > think of any real problems with doing that. > > You can't pass parameters to the close callback/event, but you can use > closures to essentially do the same thing. If you need more info on > how to do that just reply to this thread again. > > Hope that helps, let us know if you have any more questions or > problems. Also, there may be valid reasons for letting a developer > reposition the dialog that we're just not seeing. If you think there > are, you could try to persuade the UI team to add it as a feature. > > On Dec 10, 5:57 pm, patrick davey <[email protected]> wrote: > > > I have a table with about 50 rows (more than a screen length anyway!) > > each row represents a distinct request. > > > When I scroll over one of the cells in the row I am pulling the > > lengthy description of the request and displaying it in a modal > > dialog. > > > <div id="descriptionDialog"> > > <div id="descriptionDialogContent"></div> > > </div> > > > The descriptionDialog is the dialog, and I empty and re-fill the > > descriptionDialogContent with each new request as it is hovered over. > > If there are better ways of doing this (which there almost certainly > > are!) please let me know!... > > > Anyway ..that all works fine, the thing I can't quite get to work > > (nicely) is that as you scroll down the page the dialog doesn't > > recenter. So.. if you're looking at the 50th request - the dialog is > > showing the correct info - but you have to scroll back up to the top > > of the page to see it. > > > If I close and re-open the dialog every time, then it will re-center > > down the page correctly, but that messes up other things and I'm sure > > there's a nicer way of doing it. > > > So! My question :) > > > 1) Is there a way to re-center an already open dialog within the > > currently viewable window, without having to close it and re-open it. > > > 2) If not, can I pass parameters to my bound close function when I > > call it through $("#descriptionDialog").dialog('close'); > > > Thanks for any and all suggestions! > > Patrick --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
