mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Resizable: Modified the default z-index value of resizable handles. Fixed #7960 - Dialog: Modal dialogs do not disable resizables on the page.
This commit is contained in:
parent
a68d5ca31d
commit
0cd470b0d5
@ -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"
|
||||
]
|
||||
});
|
||||
|
@ -19,7 +19,7 @@ TestHelpers.commonWidgetTests('resizable', {
|
||||
maxWidth: null,
|
||||
minHeight: 10,
|
||||
minWidth: 10,
|
||||
zIndex: 1000,
|
||||
zIndex: 90,
|
||||
|
||||
// callbacks
|
||||
create: null
|
||||
|
@ -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);
|
||||
|
3
ui/jquery.ui.resizable.js
vendored
3
ui/jquery.ui.resizable.js
vendored
@ -42,7 +42,8 @@ $.widget("ui.resizable", $.ui.mouse, {
|
||||
maxWidth: null,
|
||||
minHeight: 10,
|
||||
minWidth: 10,
|
||||
zIndex: 1000
|
||||
// See #7960
|
||||
zIndex: 90
|
||||
},
|
||||
_create: function() {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user