Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resizable: Modified the default z-index value of resizable handles. Fix... #840

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/unit/resizable/resizable.html
Expand Up @@ -16,6 +16,7 @@
"ui/jquery.ui.core.js",
"ui/jquery.ui.widget.js",
"ui/jquery.ui.mouse.js",
"ui/jquery.ui.dialog.js",
"ui/jquery.ui.resizable.js"
]
});
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/resizable/resizable_common.js
Expand Up @@ -19,7 +19,7 @@ TestHelpers.commonWidgetTests('resizable', {
maxWidth: null,
minHeight: 10,
minWidth: 10,
zIndex: 1000,
zIndex: 90,

// callbacks
create: null
Expand Down
14 changes: 14 additions & 0 deletions tests/unit/resizable/resizable_options.js
Expand Up @@ -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 changes: 2 additions & 1 deletion ui/jquery.ui.resizable.js
Expand Up @@ -42,7 +42,8 @@ $.widget("ui.resizable", $.ui.mouse, {
maxWidth: null,
minHeight: 10,
minWidth: 10,
zIndex: 1000
// See #7960
zIndex: 90
},
_create: function() {

Expand Down