mirror of
https://github.com/ansible/awx.git
synced 2026-05-24 17:17:45 -02:30
Dismiss tool tip dialog when escape key is pressed.
This commit is contained in:
@@ -164,6 +164,11 @@ angular.module('AWDirectives', ['RestServices'])
|
||||
var title = (attrs.title != undefined && attrs.title != null) ? attrs.title : 'Help';
|
||||
$(element).popover({ placement: placement, delay: 0, title: title,
|
||||
content: attrs.awPopOver, delay: 0, trigger: 'click', html: true });
|
||||
$(document).bind('keydown', function(e) {
|
||||
if (e.keyCode === 27) {
|
||||
$(element).popover('hide');
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user