aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/dialog/dialog_defaults.js14
1 files changed, 13 insertions, 1 deletions
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,