Automatically focus the last modal button so that pressing enter submits the modal directly

This commit is contained in:
Alex Tselegidis 2024-06-18 16:04:49 +02:00
parent ea95b20873
commit 48d84491ab

View file

@ -105,6 +105,10 @@ window.App.Utils.Message = (function () {
backdrop: 'static',
});
$messageModal.on('shown.bs.modal', () => {
$messageModal.find('.modal-footer button:last').focus();
});
messageModal.show();
$messageModal.css('z-index', '99999').next().css('z-index', '9999');