From 064665d0a3b1d057859d04689a0bd96a0e18e7e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Tue, 25 Jul 2023 23:04:03 +0200 Subject: [PATCH] Clean the new account fields after registration --- pwa/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pwa/app.js b/pwa/app.js index bd02331..b7aeb0c 100644 --- a/pwa/app.js +++ b/pwa/app.js @@ -142,6 +142,10 @@ document.addEventListener('DOMContentLoaded', () => { console.log(new_account); new_account.register(); console.log(`Account ${new_account.getName()} added.`); + ['#new-addr-local-part', '#new-addr-domain', '#new-addr-key'].forEach((selector) => { + document.querySelector(selector).value = ''; + }); + document.querySelector('#new-addr-separator').value = '+'; syncAccountList(); closeAllModals(); });