Opened 10 years ago

Closed 10 years ago

#9478 closed bug (notabug)

UI dialog's show complete() option overridden by default callback function

Reported by: ktraff Owned by:
Priority: minor Milestone: none
Component: ui.dialog Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:

Description

It seems that UI 1.10.3 no longer supports providing a complete() callback function on show effect options for UI Dialog components:

This works in jQuery UI 1.9.2 (jQuery 1.8.3): http://jsfiddle.net/ktraff/sfuVu/3/

But no longer works in UI 1.10.3 (jQuery 1.9.1): http://jsfiddle.net/ktraff/jMGvY/8/

If you replace line 806 in jquery-ui.js from:

options.complete = callback;

to:

options.complete = $.isFunction(options.complete) ? options.complete : callback;

the issue appears to be fixed, though I haven't done enough testing to prove that other side-effects of this patch don't break other components.

Change History (1)

comment:1 Changed 10 years ago by Scott González

Resolution: notabug
Status: newclosed

The show option is for specifying what effect to use, if any. It is not for binding callbacks. The documentation purposely does not mention callbacks, and only specified effect, delay, duration, and easing as possible properties. You should use the focus event if you want to know when the dialog has finished opening.

Note: See TracTickets for help on using tickets.