Index: static/js/main.js |
=================================================================== |
--- a/static/js/main.js |
+++ b/static/js/main.js |
@@ -323,29 +323,30 @@ |
document |
.querySelector(".article-body") |
.insertAdjacentElement("afterbegin", section); |
} |
BrowserSelect.prototype._onClickOrKeyDown = function(event) |
{ |
- if (!event.target.classList.contains("custom-select-option")) return; |
+ var option = event.target.closest(".custom-select-option"); |
+ if (!option) return; |
var IS_ENTER_KEY = event.key == "Enter" || event.keyCode == 13; |
if (event.keyCode && !IS_ENTER_KEY) return; |
localStorage.removeItem(this.BROWSER_AUTODETECTED_STORAGE_KEY); |
// Uncheck previously checked option |
this.select |
.querySelector("[aria-checked='true']") |
.setAttribute("aria-checked", "false"); |
- this.selectOption(event.target.getAttribute("data-value")); |
+ this.selectOption(option.getAttribute("data-value")); |
this.close(); |
}; |
var browserSelect = document.getElementById("browser-select"); |
if (browserSelect) |
{ |
new BrowserSelect(browserSelect); |