diff --git a/js/quickref.js b/js/quickref.js index 6c3a2aed..58c083b9 100644 --- a/js/quickref.js +++ b/js/quickref.js @@ -44,9 +44,11 @@ function show_modal(data, color, type) { $("#modal-bullets").html(bullets_html); } -function hide_modal() { - $("body").removeClass("modal-open"); - $("#modal").removeClass("modal-visible"); +function hide_modal(e) { + if ($.containsnt($("#modal-container").parent()[0], e.target)) { + $("body").removeClass("modal-open"); + $("#modal").removeClass("modal-visible"); + } } function fill_section(data, parentname, type) {