1
Fork 0

Rollup merge of #65741 - GuillaumeGomez:help-popup, r=Dylan-DPC

Prevent help popup to disappear when clicking on it

Fixes #65736.

r? @kinnison
This commit is contained in:
Tyler Mandry 2019-10-29 12:01:37 -07:00 committed by GitHub
commit c4960c2602
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -379,9 +379,13 @@ function getSearchElement() {
set_fragment(cur_id); set_fragment(cur_id);
} }
} else if (hasClass(document.getElementById("help"), "hidden") === false) { } else if (hasClass(getHelpElement(), "hidden") === false) {
addClass(document.getElementById("help"), "hidden"); var help = getHelpElement();
removeClass(document.body, "blur"); var is_inside_help_popup = ev.target !== help && help.contains(ev.target);
if (is_inside_help_popup === false) {
addClass(help, "hidden");
removeClass(document.body, "blur");
}
} else { } else {
// Making a collapsed element visible on onhashchange seems // Making a collapsed element visible on onhashchange seems
// too late // too late