Skip to content
Snippets Groups Projects
Commit 59f263a2 authored by Jared Hancock's avatar Jared Hancock
Browse files

Merge pull request #645 from protich/issue/close-tip-onclick


Close tip popup on click outside the tip box.

Reviewed-By: default avatarJared Hancock <jared@osticket.com>
parents 7145785a 9c07c6de
No related branches found
No related tags found
No related merge requests found
...@@ -400,11 +400,16 @@ $(document).ready(function(){ ...@@ -400,11 +400,16 @@ $(document).ready(function(){
return false; return false;
}); });
$(document).keydown(function(e) { $(document).keydown(function(e) {
if (e.keyCode == 27) {
if (e.keyCode == 27 && !$('#overlay').is(':hidden')) {
$('div.dialog').hide(); $('div.dialog').hide();
$('#overlay').hide(); $('#overlay').hide();
}
e.preventDefault();
e.stopPropagation();
return false;
}
}); });
/* advanced search */ /* advanced search */
......
...@@ -213,4 +213,12 @@ jQuery(function() { ...@@ -213,4 +213,12 @@ jQuery(function() {
e.preventDefault(); e.preventDefault();
$(this).parent().parent().remove(); $(this).parent().parent().remove();
}); });
$(document).live('mouseup', function (e) {
var container = $('.tip_box');
if (!container.is(e.target)
&& container.has(e.target).length === 0) {
container.remove();
}
});
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment