Skip to content

Commit 96e78a2

Browse files
committed
Dialog: Updated test for default position option. QUnit still fails the test though.
1 parent 6de9a53 commit 96e78a2

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/unit/dialog/dialog_defaults.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,19 @@ var dialog_defaults = {
1717
minHeight: 150,
1818
minWidth: 150,
1919
modal: false,
20-
position: 'center',
20+
position: {
21+
my: 'center',
22+
at: 'center',
23+
of: window,
24+
collision: 'fit',
25+
// ensure that the titlebar is never outside the document
26+
using: function(pos) {
27+
var topOffset = $(this).css(pos).offset().top;
28+
if (topOffset < 0) {
29+
$(this).css('top', pos.top - topOffset);
30+
}
31+
}
32+
},
2133
resizable: true,
2234
show: null,
2335
stack: true,

0 commit comments

Comments
 (0)