]> source.dussan.org Git - jquery-ui.git/commitdiff
Resizable: Modified the default z-index value of resizable handles. Fixed #7960...
authorTJ VanToll <tj.vantoll@gmail.com>
Sat, 24 Nov 2012 21:23:03 +0000 (16:23 -0500)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 26 Nov 2012 11:42:44 +0000 (12:42 +0100)
tests/unit/resizable/resizable.html
tests/unit/resizable/resizable_common.js
tests/unit/resizable/resizable_options.js
ui/jquery.ui.resizable.js

index 0a27f2a80eb89d7bba6fe799ca25a8d4079b19fd..7a63de0bccb7682b81b6f8beb98beaeaee92906a 100644 (file)
@@ -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"
                ]
        });
index 119f5bd0ed6db001411b15320848208720e07ef3..2c64f3cb1feceb650d012740f15604ceb85fabf6 100644 (file)
@@ -19,7 +19,7 @@ TestHelpers.commonWidgetTests('resizable', {
                maxWidth: null,
                minHeight: 10,
                minWidth: 10,
-               zIndex: 1000,
+               zIndex: 90,
 
                // callbacks
                create: null
index 4b47762ab8799d22029c32027401bc8659a518f1..c8627953b749b1e879f8e14836abe41de478af0d 100644 (file)
@@ -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);
index 41f3c03c09f1d00621e69f959dbb5972668877ee..4a019336e3db1b88228bc7e7665f79070b2ae3b3 100644 (file)
@@ -42,7 +42,8 @@ $.widget("ui.resizable", $.ui.mouse, {
                maxWidth: null,
                minHeight: 10,
                minWidth: 10,
-               zIndex: 1000
+               // See #7960
+               zIndex: 90
        },
        _create: function() {