mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -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:
parent
6fa95322f5
commit
fde13c6a46
@ -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');
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user