I had a problem with this and I finally figured this out. Until today I was using a really old version of jQuery, version 1.8.2.
Everywhere where I had used dialog
I had initialised it with the following position option:
$.dialog({
position: "center"
});
However, I found that removing position: "center"
or replacing it with the correct syntax didn't do the trick, for example:
$.dialog({
position: {
my: "center",
at: "center",
of: window
}
});
Although the above is correct, I was also using option
to set the position as center when I loaded the page, in the old way, like so:
// The wrong old way of keeping a dialog centered
passwordDialogInstance.dialog("option", "position", "center");
This was causing all of my dialog windows to stick to the top left of the view port.
I had to replace all instances of this with the correct new syntax below:
passwordDialogInstance.dialog(
"option",
"position",
{ my: "center", at: "center", of: window }
);