web: fix a bug with keypress listener on the final amount input in AddForm not getting initialized correctly

This commit is contained in:
charukiewicz 2021-05-03 02:02:54 -05:00 committed by Simon Michael
parent 0078f1a520
commit 00ffd3ec13

View File

@ -23,6 +23,12 @@ $(document).ready(function() {
dateEl.datepicker('hide'); dateEl.datepicker('hide');
}); });
// ensure that the keypress listener on the final amount input is always active
$('#addform')
.on('focus', '.amount-input:last', function() {
addformLastAmountBindKey();
});
// keyboard shortcuts // keyboard shortcuts
// 'body' seems to hold focus better than document in FF // 'body' seems to hold focus better than document in FF
$('body').bind('keydown', 'h', function(){ $('#helpmodal').modal('toggle'); return false; }); $('body').bind('keydown', 'h', function(){ $('#helpmodal').modal('toggle'); return false; });