Opened 14 years ago

Closed 13 years ago

#4675 closed bug (duplicate)

Cannot set focus after 'show' animation

Reported by: dnagir Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.dialog Version: 1.7.2
Keywords: dialog, animation, focus Cc: [email protected]
Blocked by: Blocking:


The aim: set focus to first input control in the dialog. Code:

var editDialog = $('#dialogEditor').dialog({

modal: true, autoOpen: false, position: 'top',

width: dialogWidth

show: 'fold', focus is not set when the animation is


hide: 'fold', open: function(ev, ui) {

$('#dialogEditor input:first').focus(); Set focus



Then use


Expected: animation starts, dialog opens, focus is set to the input element.

Actual: animation starts, dialog opens, no focus is set.

Attachments (1)

ui.dialog.js (17.2 KB) - added by topaxi 14 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 14 years ago by elucidos

I get the same problem, trying to set focus after opening doesn't fix it.

comment:2 Changed 14 years ago by topaxi

patched ui.dialog.js on my own, dunno how i should submit patches, but here you go :)

Changed 14 years ago by topaxi

Attachment: ui.dialog.js added

comment:3 Changed 14 years ago by Jörn Zaefferer

Milestone: TBD1.8

What exactly did you change?

comment:4 Changed 13 years ago by ajcrews

Related tickets: #4421, #4731, #5767


Dialog: If a show animation is provided, the post-show code dependent on the dialog being ready occur in a callback function passed to the show method. Fixed #4421, 4675 - Focus lost from dialog which uses show effect.

comment:7 Changed 13 years ago by Scott González

Resolution: duplicate
Status: newclosed

Duplicate of #4421.

Note: See TracTickets for help on using tickets.