From 027cdf071de95dbc3038f3a6696391b5dd3d2586 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Tue, 8 Feb 2022 08:50:06 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20Clear=20search=20results=20when?= =?UTF-8?q?=20wrapper=20dismissed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #109 --- CHANGELOG.md | 1 + assets/js/search.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 540858bb..1f5af5d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed - Main content area not growing to fill screen vertically +- Search results not cleared when search is dismissed ([#109](https://github.com/jpanther/congo/pull/109)) ## [2.0.3] - 2022-02-07 diff --git a/assets/js/search.js b/assets/js/search.js index 89a0b442..c15de8fe 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -84,6 +84,8 @@ function hideSearch() { if (searchVisible) { document.body.style.overflow = "visible"; wrapper.style.visibility = "hidden"; + input.value = ""; + output.innerHTML = ""; document.activeElement.blur(); searchVisible = false; }