mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 00:08:44 -03:30
Prevent the page from reloading when an alert modal is open but not focused and the user hits enter
This commit is contained in:
@@ -134,6 +134,7 @@ angular.module('Utilities', ['RestServices', 'Utilities', 'sanitizeFilter'])
|
||||
});
|
||||
$(document).bind('keydown', function (e) {
|
||||
if (e.keyCode === 27 || e.keyCode === 13) {
|
||||
e.preventDefault();
|
||||
$('#alert-modal2').modal('hide');
|
||||
}
|
||||
});
|
||||
@@ -161,6 +162,7 @@ angular.module('Utilities', ['RestServices', 'Utilities', 'sanitizeFilter'])
|
||||
});
|
||||
$(document).bind('keydown', function (e) {
|
||||
if (e.keyCode === 27 || e.keyCode === 13) {
|
||||
e.preventDefault();
|
||||
$('#alert-modal').modal('hide');
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user