Skip to main content

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)
  • ui.dialog.js (17.2 KB) - added by topaxi October 04, 2009 02:39PM UTC.
Change History (7)

Changed September 04, 2009 02:01PM UTC by elucidos comment:1

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

Changed October 03, 2009 04:35PM UTC by topaxi 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 jzaefferer comment:3

milestone: TBD1.8

What exactly did you change?

Changed June 24, 2010 05:58PM UTC by ajcrews 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 ajcrews comment:5

Changed June 24, 2010 06:52PM UTC by ajcrews comment:6

Changed October 01, 2010 07:13PM UTC by scottgonzalez comment:7

resolution: → duplicate
status: newclosed

Duplicate of #4421.