From 1fb2ef6b0c2aa81f09c532dbbb0ddb1d4550d3a1 Mon Sep 17 00:00:00 2001 From: koksnuss Date: Tue, 19 May 2020 10:30:23 +0200 Subject: [PATCH] #30: clear modal input text fields on detach --- coinmanager/coinc/static/coinc/modules/modal.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coinmanager/coinc/static/coinc/modules/modal.mjs b/coinmanager/coinc/static/coinc/modules/modal.mjs index 3731d8e..96f0cf9 100644 --- a/coinmanager/coinc/static/coinc/modules/modal.mjs +++ b/coinmanager/coinc/static/coinc/modules/modal.mjs @@ -100,6 +100,8 @@ function detach(modal) { $('#' + modal + '_action').off('click'); $('#' + modal + '_close').off('click'); $(document).off('keypress click'); + $('#' + modal + ' input:text:visible').each(function() { + $(this).val(''); }); } export { Modal, detach, hide };