Opened 15 years ago
Closed 15 years ago
#3181 closed bug (worksforme)
Centering a Modal dialog box
Reported by: | Owned by: | Scott González | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | ui.dialog | Version: | 1.5.2 |
Keywords: | Modal center dialog | Cc: | |
Blocked by: | Blocking: |
Description
I'm displaying a dialog box centered. It works fine as long as I don't scroll down on the web page. If I scroll down and clink my link to display the dialog, the browser scrolls back to the top and the dialog is display centered horizontally but not vertically. I have tried this in FF3 and IE6.
I would like the dialog box to display centered in the browser regardless of where on the page the user has scrolled.
This is the code I ue to create the dialog.
$('#new_event_form').addClass('flora').dialog({
autoOpen: false, height: 260, width: 400, modal: true, center: true, resizable: false});
Note: See
TracTickets for help on using
tickets.
This works fine for me. Also, there is no "center" option. You need to do position: "center", which is the default positioning.