Merge "Hide form tooltip when form closes on escape key"

This commit is contained in:
Jenkins 2013-08-29 12:04:53 +00:00 committed by Gerrit Code Review
commit f91df5bb9c
1 changed files with 7 additions and 0 deletions

View File

@ -197,6 +197,13 @@ horizon.addInitFunction(function () {
$(document).on('mousedown keydown', '.form-field select', function (evt) {
$(this).tooltip('hide');
});
// Hide the tooltip after escape button pressed
$(document).on('keydown.esc_btn', function (evt) {
if (evt.keyCode == 27) {
$('.tooltip').hide();
}
});
// Hide the help text for js-capable browsers
$('span.help-block').hide();
});