From: Scott González Date: Wed, 14 Jul 2010 20:38:16 +0000 (-0400) Subject: Dialog: Updated test for default position option. QUnit still fails the test though. X-Git-Tag: 1.8.3~43 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=96e78a2cb7968fead62cfebd7640d3b96246f8dd;p=jquery-ui.git Dialog: Updated test for default position option. QUnit still fails the test though. --- diff --git a/tests/unit/dialog/dialog_defaults.js b/tests/unit/dialog/dialog_defaults.js index 999021d95..cba514fe7 100644 --- a/tests/unit/dialog/dialog_defaults.js +++ b/tests/unit/dialog/dialog_defaults.js @@ -17,7 +17,19 @@ var dialog_defaults = { minHeight: 150, minWidth: 150, modal: false, - position: 'center', + position: { + my: 'center', + at: 'center', + of: window, + collision: 'fit', + // ensure that the titlebar is never outside the document + using: function(pos) { + var topOffset = $(this).css(pos).offset().top; + if (topOffset < 0) { + $(this).css('top', pos.top - topOffset); + } + } + }, resizable: true, show: null, stack: true,