Opened 12 years ago

Closed 12 years ago

#7540 closed bug (notabug)

Unusual Button Behavior in jQueryUi Modal Dialog

Reported by: photo_tom Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.dialog Version: 1.8.14
Keywords: Cc:
Blocked by: Blocking:


I have a jQueryUi Modal dialog up and running correctly based on an Asp.Net MVC3 partial view. For all but one of the fields, pressing the CANCEL button does what is expected. The button click handler function in the dialog options is called and dialog.close() is called. You can see it at

When any field is for entry is clicked on, there is some JavaScript that runs that highlights the label and the input control by adding a css class tag to the table row that both are in.

Last Name field is different in that it is a textarea control with some events attached dynamically for displaying the number of reaming characters the user can enter. Pressing the CANCEL button while this field has focus, initially causes the field to loose focus and the function on the CANCEL button function in the dialog options is not called. The second time you press the CANCEL button, the dialog will close properly.

This form works properly in FF5, it works as described above in Chrome 12, IE9 and IE9 in IE8 compatibility mode.

Change History (1)

comment:1 Changed 12 years ago by rdworth

Resolution: invalid
Status: newclosed

This is not a jQuery UI bug. Here's a minimal test case showing it's simply the way the browser behaves when the onblur callback moves the element that was being clicked that caused the blur:

As a workaround, you can call the removeClass in a setTimeout. Quick test shows you'll want to allow maybe 20 milliseconds

Last edited 12 years ago by rdworth (previous) (diff)
Note: See TracTickets for help on using tickets.