From a8c4ddd787d7e37be0c9576170f83bf33dbe8134 Mon Sep 17 00:00:00 2001 From: iou1name Date: Wed, 6 Nov 2019 13:08:55 -0500 Subject: [PATCH] switching tabs clears previous tab input --- static/saddle.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/saddle.js b/static/saddle.js index 62cdc4c..aa67383 100644 --- a/static/saddle.js +++ b/static/saddle.js @@ -5,6 +5,9 @@ function switchFileTab(span, window_id) { let old_window = document.querySelector('.tabWindowSelected'); old_window.classList.remove('tabWindowSelected'); + for (let input of old_window.querySelectorAll('input')) { + input.value = ''; + } let tab_window = document.querySelector('#' + window_id); tab_window.classList.add('tabWindowSelected'); }