Skip to content

Commit 8ce8b77

Browse files
tjvantollscottgonzalez
authored andcommitted
Resizable: Apply zIndex option to all handles. Partial Fix for #7960- Modal dialog does not disable resizables on the page.
(cherry picked from commit 6150aba)
1 parent 849b562 commit 8ce8b77

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

tests/unit/resizable/resizable_options.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,13 @@ test("ui-resizable-nw { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 1
187187
equals( target.height(), 100, "compare maxHeight" );
188188
});
189189

190+
test("zIndex, applied to all handles", function() {
191+
expect(8);
192+
193+
var target = $('<div></div>').resizable({ handles: 'all', zIndex: 100 });
194+
target.children( '.ui-resizable-handle' ).each( function( index, handle ) {
195+
equals( $( handle ).css( 'zIndex' ), 100, 'compare zIndex' );
196+
});
197+
});
198+
190199
})(jQuery);

themes/base/jquery.ui.resizable.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* http://docs.jquery.com/UI/Resizable#theming
99
*/
1010
.ui-resizable { position: relative;}
11-
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
11+
.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; }
1212
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
1313
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
1414
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }

ui/jquery.ui.resizable.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ $.widget("ui.resizable", $.ui.mouse, {
9898
var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle;
9999
var axis = $('<div class="ui-resizable-handle ' + hname + '"></div>');
100100

101-
// increase zIndex of sw, se, ne, nw axis
102-
//TODO : this modifies original option
103-
if(/sw|se|ne|nw/.test(handle)) axis.css({ zIndex: ++o.zIndex });
101+
// Apply zIndex to all handles - see #7960
102+
axis.css({ zIndex: o.zIndex });
104103

105104
//TODO : What's going on here?
106105
if ('se' == handle) {

0 commit comments

Comments
 (0)