focus first typeable element. except pickers

eg: this is for preventing: "datepicker flashes immediately right after modal shows."
pull/2014/head
Alper Ebicoglu 6 years ago
parent 91f10eec66
commit 7ee60ed51c

@ -94,7 +94,10 @@ $.validator.defaults.ignore = ''; //TODO: Would be better if we can apply only f
});
_$modal.on('shown.bs.modal', function () {
_$modal.find('input:not([type=hidden]):first').focus();
//focuses first typeable element.
_$modal
.find('input[type=text]:not(.datepicker),input[type=password],input[type=email],input[type=number],input[type=search],input[type=tel],input[type=url]:first')
.focus();
});
var modalClass = abp.modals[options.modalClass];

Loading…
Cancel
Save