Search and Top Navigation
#4675 closed bug (duplicate)
Opened July 12, 2009 11:26PM UTC
Closed October 01, 2010 07:13PM UTC
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: | dnagir@gmail.com |
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 (7)
Changed September 04, 2009 02:01PM UTC by comment:1
Changed October 03, 2009 04:35PM UTC by comment:2
patched ui.dialog.js on my own, dunno how i should submit patches, but here you go :)
Changed November 17, 2009 08:29AM UTC by comment:3
milestone: | TBD → 1.8 |
---|
What exactly did you change?
Changed June 24, 2010 05:58PM UTC by comment:4
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.
Changed June 24, 2010 06:49PM UTC by comment:5
Changed June 24, 2010 06:52PM UTC by comment:6
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.