From 0345cb23200c2ad97b623bc2000ee77dfa9bb648 Mon Sep 17 00:00:00 2001 From: Rolux Date: Sun, 21 Feb 2010 14:28:41 +0530 Subject: [PATCH] make sure dialog stays on screen after size reset --- build/js/ox.ui.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 08943f0..04ab846 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -1363,8 +1363,11 @@ requires } function reset() { - that.width(self.options.width); - that.height(self.options.height); + that.css({ + left: Math.max(that.offset().left, 24 - self.options.width) + }) + .width(self.options.width) + .height(self.options.height); that.$content.height(self.options.height - 80); }