Hide form tooltip when form closes on escape key
Fixes #1215277 Form tooltips used in every form. After form closes on escape button tooltip stays on screen until the page is refreshed. This fix listen escape key pressing and close opened tooltip. Change-Id: Ie01336787a3bd11ed967e085ee7dda4616441cc7
This commit is contained in:
parent
59e6cc2531
commit
608a7b6d4b
@ -185,6 +185,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();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user