aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app/browser.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/app/browser.js b/src/app/browser.js
index fea9dec..7afce22 100644
--- a/src/app/browser.js
+++ b/src/app/browser.js
@@ -437,7 +437,11 @@ let events = ["scroll", "mousedown", "touchdown"];
events.forEach((event) => {
browser.addEventListener(event, () => {
Preview.hide();
- Browser.filters.toggle(false);
+
+ let mouseAt = document.elementsFromPoint(mouseX, mouseY);
+ if (! mouseAt.includes(document.querySelector("#filter"))) {
+ Browser.filters.toggle(false);
+ }
})
});
@@ -462,6 +466,13 @@ view.addEventListener("did-start-loading", () => {
view.classList.add("loading");
})
+let mouseY = 0;
+let mouseX = 0;
+browser.addEventListener("mousemove", (event) => {
+ mouseY = event.clientY;
+ mouseX = event.clientX;
+})
+
let checks = document.querySelectorAll(".check");
for (let i = 0; i < checks.length; i++) {
checks[i].setAttribute("onclick", "this.classList.toggle('checked');Browser.loadfront();search.value = ''")