Ticket #4309 (closed bug: fixed)

Opened 12 months ago

Last modified 8 weeks ago

Opening multiple modal dialogs causes access problems to inputs

Reported by: boconnor Owned by: scott.gonzalez
Priority: blocker Milestone: 1.7.2
Component: ui.dialog Version: 1.7
Keywords: Cc:

Description

A modal dialog (Dialog A) is opened that has an <input> field. Another modal dialog (Dialog B) is opened. Modal Dialog B is closed.

It is now impossible to focus on the <input> field in Modal Dialog A.

Bug exists on all browsers.

Attachments

index.cfm (1.0 kB) - added by boconnor 12 months ago.
Simple example of problem
index.html (1.0 kB) - added by boconnor 12 months ago.
Simple test case
jquery-ui-dialog.patch (466 bytes) - added by MacAnthony 12 months ago.
patch file for jquery-ui.js version 1.7.1

Change History

Changed 12 months ago by boconnor

Simple example of problem

Changed 12 months ago by boconnor

Simple test case

Changed 12 months ago by MacAnthony

This has something to do with the events being added to modals. If you remove the event list from line ( link to code ) it works. Of course, this also breaks other functionality. I haven't determined if it's related to when they are binded or when they are unbinded. If there are any events in there, this problem persists. I tried removing each individual one. Didn't help.

Changed 12 months ago by MacAnthony

Removing the if expression from this code block also makes it so it works:

	destroy: function($el) {
		this.instances.splice($.inArray(this.instances, $el), 1);
        
		if (this.instances.length === 0) {
			$([document, window]).unbind('.dialog-overlay');
		}

		$el.remove();
	}

I think this would break all the overriding event binds from the original dialog box though. It looks like it should unbind all the .dialog-overlay events for the first dialog or previous dialog box if more than 2.

Changed 12 months ago by MacAnthony

patch file for jquery-ui.js version 1.7.1

Changed 12 months ago by MacAnthony

The patch file I put in there is the current patch file we are going to use to get around this until a better solution becomes available. Hopefully it might help in coming up with a more permanent solution in the core.

Changed 12 months ago by scott.gonzalez

  • milestone changed from TBD to 1.8

Changed 12 months ago by scott.gonzalez

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

Changed 11 months ago by scott.gonzalez

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

Fixed in r2431.

Changed 9 months ago by rdworth

  • milestone changed from 1.8 to 1.7.2
Note: See TracTickets for help on using tickets.