mirror of
https://github.com/ansible/awx.git
synced 2026-02-25 15:06:02 -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) {
|
$(document).bind('keydown', function (e) {
|
||||||
if (e.keyCode === 27 || e.keyCode === 13) {
|
if (e.keyCode === 27 || e.keyCode === 13) {
|
||||||
|
e.preventDefault();
|
||||||
$('#alert-modal2').modal('hide');
|
$('#alert-modal2').modal('hide');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -161,6 +162,7 @@ angular.module('Utilities', ['RestServices', 'Utilities', 'sanitizeFilter'])
|
|||||||
});
|
});
|
||||||
$(document).bind('keydown', function (e) {
|
$(document).bind('keydown', function (e) {
|
||||||
if (e.keyCode === 27 || e.keyCode === 13) {
|
if (e.keyCode === 27 || e.keyCode === 13) {
|
||||||
|
e.preventDefault();
|
||||||
$('#alert-modal').modal('hide');
|
$('#alert-modal').modal('hide');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user