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: |
Description
The aim: set focus to first input control in the dialog. Code:
var editDialog = $('#dialogEditor').dialog({
modal: true, autoOpen: false, position: 'top',
width: dialogWidth 300, show: 'fold', focus is not set when the animation is
enabled
hide: 'fold', open: function(ev, ui) {
$('#dialogEditor input:first').focus(); Set focus
}
});
Then use
editDialog.dialog('open');
Expected: animation starts, dialog opens, focus is set to the input element.
Actual: animation starts, dialog opens, no focus is set.
Attachments (1)
Change History (8)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
patched ui.dialog.js on my own, dunno how i should submit patches, but here you go :)
Changed 14 years ago by
Attachment: | ui.dialog.js added |
---|
comment:4 Changed 13 years ago by
Related tickets: #4421, #4731, #5767
Fixed: http://github.com/ajcrews/jquery-ui/commit/1d1de7fc70501c25c6ff3de204c04078602baa04
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:5 Changed 13 years ago by
comment:6 Changed 13 years ago by
Sorry, wrong link to Final version: http://github.com/ajcrews/jquery-ui/commit/405574d93211e2a419062ac0e39cbf9baefc79a8
I get the same problem, trying to set focus after opening doesn't fix it.