set autofocus attribute on form fields for better keyboard support (#640)

This commit is contained in:
Kevin Papst
2019-03-13 00:09:02 +01:00
committed by GitHub
parent f4d53e9006
commit 19bfff9899
8 changed files with 23 additions and 3 deletions

View File

@@ -252,6 +252,11 @@ $(function() {
$modal.modal({ backdrop : false });
// -----------------------------------------------------------------------
// workaround for autofocus attribute, as the modal "steals" it
$modal.on('shown.bs.modal', function () {
$(this).find('input:visible:first').focus().delay(1000).focus();
});
$modal.modal('show');
// the new form that was loaded via ajax