aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/resizable
diff options
context:
space:
mode:
authorTJ VanToll <tj.vantoll@gmail.com>2012-11-24 16:23:03 -0500
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-11-26 12:42:44 +0100
commit0cd470b0d5f8c617e761c4a6c90aeea4e3f54128 (patch)
tree1f2823eeda613940a8f8ebb7ad775e3e2df8ed74 /tests/unit/resizable
parenta68d5ca31d764a737653461cfba49debdc8ad0ba (diff)
downloadjquery-ui-0cd470b0d5f8c617e761c4a6c90aeea4e3f54128.tar.gz
jquery-ui-0cd470b0d5f8c617e761c4a6c90aeea4e3f54128.zip
Resizable: Modified the default z-index value of resizable handles. Fixed #7960 - Dialog: Modal dialogs do not disable resizables on the page.
Diffstat (limited to 'tests/unit/resizable')
-rw-r--r--tests/unit/resizable/resizable.html2
-rw-r--r--tests/unit/resizable/resizable_common.js2
-rw-r--r--tests/unit/resizable/resizable_options.js14
3 files changed, 17 insertions, 1 deletions
diff --git a/tests/unit/resizable/resizable.html b/tests/unit/resizable/resizable.html
index 0a27f2a80..7a63de0bc 100644
--- a/tests/unit/resizable/resizable.html
+++ b/tests/unit/resizable/resizable.html
@@ -16,6 +16,8 @@
"ui/jquery.ui.core.js",
"ui/jquery.ui.widget.js",
"ui/jquery.ui.mouse.js",
+ "ui/jquery.ui.button.js",
+ "ui/jquery.ui.dialog.js",
"ui/jquery.ui.resizable.js"
]
});
diff --git a/tests/unit/resizable/resizable_common.js b/tests/unit/resizable/resizable_common.js
index 119f5bd0e..2c64f3cb1 100644
--- a/tests/unit/resizable/resizable_common.js
+++ b/tests/unit/resizable/resizable_common.js
@@ -19,7 +19,7 @@ TestHelpers.commonWidgetTests('resizable', {
maxWidth: null,
minHeight: 10,
minWidth: 10,
- zIndex: 1000,
+ zIndex: 90,
// callbacks
create: null
diff --git a/tests/unit/resizable/resizable_options.js b/tests/unit/resizable/resizable_options.js
index 4b47762ab..c8627953b 100644
--- a/tests/unit/resizable/resizable_options.js
+++ b/tests/unit/resizable/resizable_options.js
@@ -210,4 +210,18 @@ test("zIndex, applied to all handles", function() {
});
});
+test( "zIndex, less than a modal dialog's overlay by default", function() {
+ expect(1);
+
+ var resizable = $( '<div></div>' ).resizable();
+ var dialog = $( '<div></div>' ).dialog( { modal: true });
+
+ var resizableZIndex = resizable.resizable( 'option', 'zIndex' );
+ var overlayZIndex = $( '.ui-widget-overlay' ).css( 'zIndex' );
+ overlayZIndex = parseInt( overlayZIndex, 10 );
+
+ ok( resizableZIndex < overlayZIndex, "Resizables behind a modal dialog must have a smaller z-index than the overlay so that they're not resizable. See #7960." );
+ dialog.dialog( 'destroy' );
+});
+
})(jQuery);