Showing posts from February, 2014

jQuery UI dialog centering ultimate fix

UPDATE OCTOBER 2014 : jQuery UI was recently updated and the dialogs finally position correctly at the center of the screen! Don't specify any position for your dialog and it'll in the right place by default. Glad they got that sorted out! [This post is now obsolete] I have been having issues positioning jQuery UI dialogs for a long time. What I expect from a modal dialog is simple: it must be centered on the screen if I scroll the page, the dialog should still be at the center of the screen (fixed position) when I invoke the dialog for example by clicking a link, the page must not scroll either when I close the dialog, the page must not scroll up or down Simple requirements you say; though for some reason I haven't been able to achieve this with basic jQuery UI functions. I would *always* have at least one of the following issues, even after trying a good number of fixes recommended online: dialog shows up off screen (scrolling is required to be able t