From c85e6d919eb333900225b8f107e03843c0f85e36 Mon Sep 17 00:00:00 2001 From: Robin Appelman <icewind@owncloud.com> Date: Tue, 13 May 2014 12:58:02 +0200 Subject: [PATCH] Use jquery to get the window width --- core/js/jquery.ocdialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/js/jquery.ocdialog.js b/core/js/jquery.ocdialog.js index 66d9b12db3..e2433f5f98 100644 --- a/core/js/jquery.ocdialog.js +++ b/core/js/jquery.ocdialog.js @@ -67,8 +67,8 @@ self.parent = self.$dialog.parent().length > 0 ? self.$dialog.parent() : $('body'); var pos = self.parent.position(); self.$dialog.css({ - left: pos.left + (window.innerWidth - self.$dialog.outerWidth())/2, - top: pos.top + (window.innerHeight - self.$dialog.outerHeight())/2 + left: pos.left + ($(window).innerWidth() - self.$dialog.outerWidth())/2, + top: pos.top + ($(window).innerHeight() - self.$dialog.outerHeight())/2 }); }); -- GitLab