Skip to main content

Search and Top Navigation

#5388 closed bug (fixed)

Opened March 20, 2010 08:14PM UTC

Closed October 24, 2012 09:05PM UTC

Dialog: Don't change z-index when already at the top

Reported by: jzaefferer Owned by:
Priority: major Milestone: 1.10.0
Component: ui.dialog Version: 1.8
Keywords: Cc:
Blocked by: Blocking:

To reproduce the issue, open tests/visual/compound/datepicker_dialog.html

Then click on the input (datepicker opens) and click on it again (dialog moves in front of datepicker), it shouldn't.

Attachments (0)
Change History (5)

Changed May 10, 2010 07:54AM UTC by watanabe comment:1

it seems "modal" dialog does not move in front of datepicker.

jQuery UI 1.8.1 Uncompressed Version.


line 80(dialog _create)

.mousedown(function(event) {
	self.moveToTop(false, event);

Test code:(for tests/visual/compound/datepicker_dialog.html)

$('#datepicker').mousedown(function () { return false; });

seems to prevent dialog moving in front of datepicker.

(press tab key to focus #datepicker.)

I don't know how to find the dialog is already at the top.

Test code:(jquery.ui.dialog.js, line 254, dialog moveToTop)

if (self.uiDialog.css('z-index') != $.ui.dialog.maxZ) { //<-append
	if (self.overlay) {
		$.ui.dialog.maxZ += 1;
		self.overlay.$el.css('z-index', $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ);

	//Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.
	saveScroll = { scrollTop: self.element.attr('scrollTop'), scrollLeft: self.element.attr('scrollLeft') };
	$.ui.dialog.maxZ += 1;
	self.uiDialog.css('z-index', $.ui.dialog.maxZ);
} //<-append

may work.

Changed October 11, 2012 02:47PM UTC by scottgonzalez comment:2


Changed October 16, 2012 12:59PM UTC by petersendidit comment:3

#7884 is a duplicate of this ticket.

Changed October 16, 2012 01:00PM UTC by petersendidit comment:4

status: newopen

Changed October 24, 2012 09:05PM UTC by Nate Eagle comment:5

resolution: → fixed
status: openclosed

Dialog: Awesome new stacking and overlay implementation. Fixes the following tickets:

Fixes #3534 - Dialog: Modal dialog disables all input elements on page.

Fixes #4671 - Dialog: Modal Dialog disables vertical scroll bar in Chrome & Safari.

Fixes #4995 - Dialog: Modal Dialog's overlay dissapears in IE when content is tall.

Fixes #5388 - Dialog: Don't change z-index when already at the top.

Fixes #5466 - Dialog: "modal" Dialog Incorrectly Cancels Input Events.

Fixes #5762 - Dialog: Get rid of z-index workaround, document it instead.

Fixes #6267 - Dialog: checkboxes that inherit a z-index < jqueryui.dialog z-index don't work.

Fixes #7051 - Dialog: modal prevents tab key from moving focus off slider handle.

Fixes #7107 - Dialog: Modal dialog event loss with high zindex child elements (FF 3.6).

Fixes #7120 - Dialog: Modal operation interrupts drag drop marker functionality on gmaps.

Fixes #8172 - Dialog: Change event cancelled when opening modal dialog from another modal dialog.

Fixes #8583 - Dialog: Mouse event wrongly stopped.

Fixes #8722 - Dialog: Remove stack option.

Fixes #8729 - Dialog: Remove zIndex option.

Changeset: 3829a37ca122e923c3a08b964c4b1a946a2a1456