From 62133a8cbb0285d34a5926d68689d6077a7d9085 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Tue, 9 Aug 2022 07:20:30 +0100 Subject: [PATCH] Fix double tag input on back button --- core/templates/ui/drilldown/drilldown.html | 3 --- core/templates/ui/drilldown/results.html | 9 ++++++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/templates/ui/drilldown/drilldown.html b/core/templates/ui/drilldown/drilldown.html index 09c3de1..3b2e3bb 100644 --- a/core/templates/ui/drilldown/drilldown.html +++ b/core/templates/ui/drilldown/drilldown.html @@ -362,9 +362,6 @@
-
diff --git a/core/templates/ui/drilldown/results.html b/core/templates/ui/drilldown/results.html index 69d8e61..8cf6b55 100644 --- a/core/templates/ui/drilldown/results.html +++ b/core/templates/ui/drilldown/results.html @@ -203,7 +203,14 @@ var inputTags = document.getElementsByClassName('tags-input'); var inputBox = document.querySelector("[placeholder='Add query']"); var isFocused = (document.activeElement === inputBox); - inputTags[0].outerHTML = ''; + for (index = 0; index < inputTags.length; index++) { + if (index == 0) { + inputTags[0].outerHTML = ''; + } else { + inputTags[index].remove(); + } + } + // inputTags[0].outerHTML = ''; setupTags(); var inputBox = document.querySelector("[placeholder='Add query']"); if (isFocused) {