From b21215d2e601f07a43e172735dabbf7aec6f4638 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 6 Jan 2009 09:38:40 +0000 Subject: use "position: fixed" to keep the dialog centered in the viewport. --- lib/gallery.dialog.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/gallery.dialog.js') diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index 70f577c5..175f2a42 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -54,7 +54,8 @@ function openDialog(element, on_success) { if (parent.width() < 400) { parent.css("width", 400); } - parent.css({"top": $(window).height() / 2 - parent.height() / 2, + parent.css({"position": "fixed", + "top": $(window).height() / 2 - parent.height() / 2, "left": $(window).width() / 2 - parent.width() / 2, "opacity": "1.0" }); -- cgit v1.2.3