I had a problem with this and I finally figured it out. Until today, I used the really old version of jQuery version 1.8.2.
Wherever I used dialog , I initialized it with the following position option:
$.dialog({ position: "center" });
However, I found that removing position: "center" or replacing it with the correct syntax did not help, for example:
$.dialog({ position: { my: "center", at: "center", of: window } });
Although the above is true, I also used option to set the position as center when I loaded the page in the old way, for example:
// The wrong old way of keeping a dialog centered passwordDialogInstance.dialog("option", "position", "center");
This made all of my dialogs stand in the upper left of the view port.
I had to replace all instances of this with the following new syntax:
passwordDialogInstance.dialog( "option", "position", { my: "center", at: "center", of: window } );
Luke Apr 14 '17 at 11:34 on 2017-04-14 11:34
source share