There are several problems related to auto focus of jQuery UI Dialog. Some of them are below: > Opening jQuery Date picker automatically on focus of dialog, because of first element get auto focused. > If dialog has scrollbar visible, its auto scrolled to top to auto focus first element of dialog. |
So to disable auto focus input element inside UI dialog, add the following code before you call dialog. This will clear out the autofocus code. |
$.ui.dialog.prototype._focusTabbable = function(){}; |
Simply brilliant. I've been searching for a way to disable this feature for years. Thanks!
ReplyDelete