Ticket #4065 (closed bug: fixed)

Opened 13 months ago

Last modified 8 weeks ago

modal dialog + button locks page

Reported by: Vovochka Owned by: scott.gonzalez
Priority: major Milestone: 1.7.2
Component: ui.dialog Version: 1.6rc6
Keywords: Cc:

Description

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

$("#oo_add_img_box")
	.dialog({
		modal: true,

		buttons: {
			'OK': function() {
				$(this).dialog('close');
			}
		}
	})
	.dialog('close');

But if I delete buttons section everything works fine

Attachments

4065-fix.diff (1.1 kB) - added by jgailor 13 months ago.
This is the patch file which fixes the problem

Change History

Changed 13 months ago by scott.gonzalez

  • priority changed from blocker to major
  • milestone changed from TBD to 1.6

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

Changed 13 months ago by jgailor

This is the patch file which fixes the problem

Changed 13 months ago by jgailor

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.

Thanks

Jeremy

Changed 13 months ago by scott.gonzalez

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

Changed 13 months ago by jgailor

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 http://some.website.com/. After triggering the pop-up and closing the window, the link to the random page worked fine.

Changed 12 months ago by rmorero

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

Scenario: 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.

Code:

jQuery(function($){
  $("#dialogDiv").dialog({
    modal:true,
    buttons: {
      'Cancel': function(){
         $(this).dialog("close");
       },
      'Save': function(){
          alert("Saving");
      }
   }).show();
}

Changed 12 months ago by rdworth

  • milestone changed from 1.7 to 1.8

Changed 12 months ago by scott.gonzalez

  • status changed from new to assigned
  • owner set to scott.gonzalez

Changed 12 months ago by scott.gonzalez

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in r2395.

Changed 10 months ago by kapouer

Using r2528, the bug still holds.

using html on the page, i do :

$("#dialog-login").dialog({
	bgiframe: true,
	autoOpen: false,
	modal: true,
	closeOnEscape: true,
	buttons: {
		OK: function() {
			// some stuff here
		}
	}
});

then a button is responsible for opening the dialog :

$("#dialog-login").dialog('open');

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

Changed 10 months ago by kapouer

it also hangs even if the button is removed.

it doesn't if modal: false

hope this helps

Changed 9 months ago by rdworth

  • milestone changed from 1.8 to 1.7.2

Changed 7 months ago by BalusC

This is certainly not fixed in 1.7.2.

Related bug: http://dev.jqueryui.com/ticket/4758

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 4 months ago by scott.gonzalez

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

Note: See TracTickets for help on using tickets.