We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb72f22 commit 3ce0e0eCopy full SHA for 3ce0e0e
js/site.js
@@ -16,6 +16,9 @@ document.body.addEventListener("click", function (event) {
16
dropdown.querySelector(".judge0-dropdown-menu").classList.toggle("hidden");
17
}
18
19
+ // For each dropdown menu check if it needs to be hidden.
20
+ // If the click is outside of the dropdown menu and if that dropdown menu is not
21
+ // the dropdown menu of the just clicked dropdown button, hide it.
22
document.querySelectorAll(".judge0-dropdown-menu").forEach(function (dropdownMenu) {
23
if (!dropdownMenu.contains(event.target) && dropdown !== dropdownMenu.closest(".judge0-dropdown")) {
24
dropdownMenu.classList.add("hidden");
0 commit comments