diff options
author | TJ VanToll <tj.vantoll@gmail.com> | 2012-01-09 21:42:56 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-04-19 20:55:02 -0400 |
commit | 6150abae49f77a3b2f67c39a3c60a06792b4de8f (patch) | |
tree | 8c70f73c4bc01ed73f54ffbb365672152663ee2f | |
parent | d783766f9053a2075c579296d819f0941796ac1c (diff) | |
download | jquery-ui-6150abae49f77a3b2f67c39a3c60a06792b4de8f.tar.gz jquery-ui-6150abae49f77a3b2f67c39a3c60a06792b4de8f.zip |
Resizable: Apply zIndex option to all handles. Partial Fix for #7960- Modal dialog does not disable resizables on the page.
-rw-r--r-- | tests/unit/resizable/resizable_options.js | 9 | ||||
-rw-r--r-- | themes/base/jquery.ui.resizable.css | 2 | ||||
-rw-r--r-- | ui/jquery.ui.resizable.js | 5 |
3 files changed, 12 insertions, 4 deletions
diff --git a/tests/unit/resizable/resizable_options.js b/tests/unit/resizable/resizable_options.js index 76cca560a..275639ca1 100644 --- a/tests/unit/resizable/resizable_options.js +++ b/tests/unit/resizable/resizable_options.js @@ -187,4 +187,13 @@ test("ui-resizable-nw { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 1 equal( target.height(), 100, "compare maxHeight" ); }); +test("zIndex, applied to all handles", function() { + expect(8); + + var target = $('<div></div>').resizable({ handles: 'all', zIndex: 100 }); + target.children( '.ui-resizable-handle' ).each( function( index, handle ) { + equals( $( handle ).css( 'zIndex' ), 100, 'compare zIndex' ); + }); +}); + })(jQuery); diff --git a/themes/base/jquery.ui.resizable.css b/themes/base/jquery.ui.resizable.css index 0bf680482..0bb688d5b 100644 --- a/themes/base/jquery.ui.resizable.css +++ b/themes/base/jquery.ui.resizable.css @@ -8,7 +8,7 @@ * http://docs.jquery.com/UI/Resizable#theming */ .ui-resizable { position: relative;} -.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; } +.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; } .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } diff --git a/ui/jquery.ui.resizable.js b/ui/jquery.ui.resizable.js index 9be33927e..c00602cc8 100644 --- a/ui/jquery.ui.resizable.js +++ b/ui/jquery.ui.resizable.js @@ -99,9 +99,8 @@ $.widget("ui.resizable", $.ui.mouse, { var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle; var axis = $('<div class="ui-resizable-handle ' + hname + '"></div>'); - // increase zIndex of sw, se, ne, nw axis - //TODO : this modifies original option - if(/sw|se|ne|nw/.test(handle)) axis.css({ zIndex: ++o.zIndex }); + // Apply zIndex to all handles - see #7960 + axis.css({ zIndex: o.zIndex }); //TODO : What's going on here? if ('se' == handle) { |