Fix autofocus() javascript to delay
Otherwise, it fires too fast for the renderer, and the focus doesn't
occur, leading to bad form performance.
***************************************************/
exported.jQuery.fn.autofocus = function () { // {{{
- this.find('.autofocus').focus();
- return this;
+ var $self = this;
+ window.setTimeout(function () {
+ $self.find('.autofocus').focus();
+ }, 150);
+ return $self;
};
// }}}
