Skip to main content

Search and Top Navigation

#4065 closed bug (fixed)

Opened February 05, 2009 11:42AM UTC

Closed March 28, 2009 04:34PM UTC

Last modified May 04, 2011 03:58PM UTC

modal dialog + button locks page

Reported by: Vovochka Owned by: scottgonzalez
Priority: major Milestone: 1.7.2
Component: ui.dialog Version: 1.6rc6
Keywords: Cc:
Blocked by: Blocking:

After executing this code the page freezes (I can't follow links)

		modal: true,

		buttons: {
			'OK': function() {

But if I delete buttons section everything works fine

Attachments (1)
  • 4065-fix.diff (1.1 KB) - added by jgailor February 06, 2009 06:01PM UTC.

    This is the patch file which fixes the problem

Change History (18)

Changed February 06, 2009 01:36PM UTC by scottgonzalez comment:1

milestone: TBD1.6
priority: blockermajor

You should use the autoOpen: false option instead of closing the dialog immediately after instantiation.

Changed February 06, 2009 06:02PM UTC by jgailor comment:2

Submited a fix for this as an attached patch file. Please send feedback/advice/criticisms if it doesn't meet the guidelines for the jquery-ui codebase.



Changed February 06, 2009 06:11PM UTC by scottgonzalez comment:3

This patch is not valid as dialogs are not supposed to be destroyed on close.

Changed February 09, 2009 06:14AM UTC by jgailor comment:4

I think I misunderstood the bug. The bug as described here I was unable to reproduce in Safari or Firefox on OS X (Leopard). I created a page with a link that triggers the pop-up using the code provided when clicked, and another link to random page After triggering the pop-up and closing the window, the link to the random page worked fine.

Changed March 04, 2009 10:27AM UTC by rmorero comment:5

I can confirm this issue.

Browsers: IE6, IE7 (possibly IE8).

Works fine in Mozilla/Webkit derivates.

jQuery version: 1.3.1 Minified

jQuery UI version: 1.6rc6 Minified

Works fine with jQuery 1.2.6 and UI 1.5


Opening a dialog with modal:true and buttons hangs IE6 & IE7

Expected result:

A modal dialog is opened with 2 buttons, "Save" and "Cancel".

Actual result:

In IE6, I get a quick glimpse of an opening dialog (but without content), and then the browser hangs.

In IE7, browser hangs directly.

IE CPU/Memory usage increases dramatically.


    buttons: {
      'Cancel': function(){
      'Save': function(){

Changed March 08, 2009 02:39PM UTC by rdworth comment:6

milestone: 1.71.8

Changed March 28, 2009 04:31PM UTC by scottgonzalez comment:7

owner: → scott.gonzalez
status: newassigned

Changed March 28, 2009 04:34PM UTC by scottgonzalez comment:8

resolution: → fixed
status: assignedclosed

Fixed in r2395.

Changed May 16, 2009 02:09PM UTC by kapouer comment:9

Using r2528, the bug still holds.

using html on the page, i do :

	bgiframe: true,
	autoOpen: false,
	modal: true,
	closeOnEscape: true,
	buttons: {
		OK: function() {
			// some stuff here

then a button is responsible for opening the dialog :


on IE8, i get a infinite loop before seeing anything.

Changed May 16, 2009 03:41PM UTC by kapouer comment:10

it also hangs even if the button is removed.

it doesn't if modal: false

hope this helps

Changed June 12, 2009 12:38PM UTC by rdworth comment:11


Changed August 27, 2009 07:32PM UTC by BalusC comment:12

This is certainly not fixed in 1.7.2.

Related bug:

The root cause is the setting 'modal' which creates an overlay which on its turn get assigned a handler for window resize. In IE8 this handler called in an infinite loop.

Changed November 13, 2009 07:31PM UTC by scottgonzalez comment:13

This is fixed in 1.7.2. The infinite loop in IE8 is a completely unrelated bug.

Changed May 03, 2010 03:15PM UTC by ignacio.cavina comment:14

I just fund that this happens to get fixed if I comment this line:

var $overlays = $([]);

$.each($.ui.dialog.overlay.instances, function() {

//$overlays = $overlays.add(this);


maybe this helps, any pointers on how to solve this would be very much appreciated

Changed May 03, 2010 05:32PM UTC by ignacio.cavina comment:15

then, I:

		var $overlays = $([]);
		// $.each($.ui.dialog.overlay.instances, function() {
			// $overlays = $overlays.add(this);
		// });

		$overlays = $overlays.add($.ui.dialog.overlay.instances[0]);

but not sure if this will break other stuff. My guess is that in IE6 it starts recurring forever.

Changed May 03, 2011 11:15PM UTC by yourmom comment:16

This bug (IE hangs upon opening modal dialog) still occurs in UI v1.8.12, with any version of jQuery (1.4,5,6). Not sure why this is marked fixed.

Tested in IE7, which proceeds to use 100% CPU. Whether a button exists is irrelevant to the problem.

Also see and

The jsfiddle in the first link also reproduces the problem.

Changed May 04, 2011 01:21PM UTC by scottgonzalez comment:17

This works fine if you include the required CSS. See

Changed May 04, 2011 03:58PM UTC by yourmom comment:18

Thanks, including the CSS does fix the hanging problem.