From 5e66bc7446c30120569a1fadc2f763ff99d41cf2 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 10 Feb 2023 18:35:18 +0100 Subject: [PATCH] frontend: fix event listeners --- frontend/src/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 702cab7..c1e0b61 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -156,9 +156,9 @@ function setupMap( fetcher.call(async () => await fetchAndDisplayZipCode(coords)); }); - mapImg.onmouseleave = (_event: MouseEvent) => { + mapImg.addEventListener("mouseleave", (_event: MouseEvent) => { displayZipCode(zipCodeElement, null, null, null, null); - }; + }); } function setupSearchBar(zipCodeElement: HTMLParagraphElement) {