mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 10:27:37 -02:30
Merge pull request #4869 from mabashian/4192-enter-textarea
Unbind keydown listeners when Alert modals are closed. Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -89,9 +89,11 @@ angular.module('Utilities', ['RestServices', 'Utilities'])
|
|||||||
scope.disableButtons2 = (disableButtons) ? true : false;
|
scope.disableButtons2 = (disableButtons) ? true : false;
|
||||||
|
|
||||||
$('#alert-modal2').on('hidden.bs.modal', function() {
|
$('#alert-modal2').on('hidden.bs.modal', function() {
|
||||||
|
$(document).unbind('keydown');
|
||||||
if (action) {
|
if (action) {
|
||||||
action();
|
action();
|
||||||
}
|
}
|
||||||
|
$('#alert-modal2').off();
|
||||||
});
|
});
|
||||||
$('#alert-modal2').on('shown.bs.modal', function() {
|
$('#alert-modal2').on('shown.bs.modal', function() {
|
||||||
$('#alert2_ok_btn').focus();
|
$('#alert2_ok_btn').focus();
|
||||||
@@ -117,10 +119,12 @@ angular.module('Utilities', ['RestServices', 'Utilities'])
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('#alert-modal').on('hidden.bs.modal', function() {
|
$('#alert-modal').on('hidden.bs.modal', function() {
|
||||||
|
$(document).unbind('keydown');
|
||||||
if (action) {
|
if (action) {
|
||||||
action();
|
action();
|
||||||
}
|
}
|
||||||
$('.modal-backdrop').remove();
|
$('.modal-backdrop').remove();
|
||||||
|
$('#alert-modal').off();
|
||||||
});
|
});
|
||||||
$('#alert-modal').on('shown.bs.modal', function() {
|
$('#alert-modal').on('shown.bs.modal', function() {
|
||||||
$('#alert_ok_btn').focus();
|
$('#alert_ok_btn').focus();
|
||||||
|
|||||||
Reference in New Issue
Block a user