diff --git a/app/frontend/Mail/LeftPane/LeftPane.svelte b/app/frontend/Mail/LeftPane/LeftPane.svelte
index cd0b6646..e0cff7e9 100644
--- a/app/frontend/Mail/LeftPane/LeftPane.svelte
+++ b/app/frontend/Mail/LeftPane/LeftPane.svelte
@@ -18,7 +18,7 @@
{:else if activeTab == SearchView.Search}
-
+
{:else}
@@ -66,7 +66,7 @@
function openSearchPane() {
activeTab = SearchView.Search;
}
- $: if (activeTab != SearchView.Search) clearSearchMessages();
+ $: activeTab, clearSearchMessages();
function clearSearchMessages() {
searchMessages = null;
lastPerson = null;
@@ -74,9 +74,10 @@
// Search.svelte is removed here above, and therefore cannot react anymore, so have to do it here.
// Reproduction: window title | search field | (x) button
- $: if (!$globalSearchTerm) onClearSearch();
- function onClearSearch() {
+ $: if (!$globalSearchTerm) onEndSearchMode();
+ function onEndSearchMode() {
activeTab = SearchView.Folder;
+ clearSearchMessages();
}
let lastPerson: Person;