.focus() with a delay
.focus() with a delay
Dialog currently uses a delayed call to DOMElement.focus() to control tabbing through the dialog:
setTimeout(function() {
el.focus();
}, 1);
It has been pointed out that this should always be done when setting focus for accessibility reasons. We should add a method in ui.core.js that does this for us. I'd like to just overwrite $.fn.focus() to do this, but I really don't think it's a good idea to switch a synchronous function to an asynchronous function. Does anyone have any ideas for a different name? .setFocus(), .accessibleFocus(), .delayedFocus()?