From 65b063b0391b4d08b649935958b69b61ea53ffd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 28 Jan 2010 03:06:43 +0000 Subject: [PATCH] Prevent the default styles for resizable elements from totally killing dialog positioning (finally). Fixes #5084 - 2 dialogs pos false on close. --- ui/jquery.ui.dialog.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 98dfd3cf9..a0be847d4 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -352,6 +352,9 @@ $.widget("ui.dialog", { handles = (handles === undefined ? this.options.resizable : handles); var self = this, options = self.options, + // .ui-resizable has position: relative defined in the stylesheet + // but dialogs have to use absolute or fixed positioning + position = self.uiDialog.css('position'), resizeHandles = typeof handles == 'string' ? handles : 'n,e,s,w,se,sw,ne,nw'; @@ -380,6 +383,7 @@ $.widget("ui.dialog", { $.ui.dialog.overlay.resize(); } }) + .css('position', position) .find('.ui-resizable-se').addClass('ui-icon ui-icon-grip-diagonal-se'); },