Skip to content

Commit

Permalink
Rollup merge of rust-lang#65741 - GuillaumeGomez:help-popup, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Prevent help popup to disappear when clicking on it

Fixes rust-lang#65736.

r? @kinnison
  • Loading branch information
tmandry authored Oct 29, 2019
2 parents 5e84805 + 863796b commit c4960c2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,13 @@ function getSearchElement() {

set_fragment(cur_id);
}
} else if (hasClass(document.getElementById("help"), "hidden") === false) {
addClass(document.getElementById("help"), "hidden");
removeClass(document.body, "blur");
} else if (hasClass(getHelpElement(), "hidden") === false) {
var help = getHelpElement();
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 {
// Making a collapsed element visible on onhashchange seems
// too late
Expand Down

0 comments on commit c4960c2

Please sign in to comment.