switching tabs clears previous tab input

This commit is contained in:
iou1name 2019-11-06 13:08:55 -05:00
parent 5afded89ce
commit a8c4ddd787

View File

@ -5,6 +5,9 @@ function switchFileTab(span, window_id) {
let old_window = document.querySelector('.tabWindowSelected'); let old_window = document.querySelector('.tabWindowSelected');
old_window.classList.remove('tabWindowSelected'); old_window.classList.remove('tabWindowSelected');
for (let input of old_window.querySelectorAll('input')) {
input.value = '';
}
let tab_window = document.querySelector('#' + window_id); let tab_window = document.querySelector('#' + window_id);
tab_window.classList.add('tabWindowSelected'); tab_window.classList.add('tabWindowSelected');
} }