Skip to content

Commit 1794c29

Browse files
committed
fix autofocus of input in the modal
1 parent d0e213c commit 1794c29

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

public/js/script.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,9 @@ function notify(body, callback) {
534534

535535
function dialog(title, value, callback) {
536536
$('#dialog').find('input').val(value);
537+
$('#dialog').on('shown.bs.modal', function () {
538+
$('#dialog').find('input').focus();
539+
});
537540
$('#dialog').find('.btn-primary').unbind().click(function (e) {
538541
callback($('#dialog').find('input').val());
539542
});

0 commit comments

Comments
 (0)