Fix double tag input on back button
This commit is contained in:
parent
09e748db73
commit
62133a8cbb
|
@ -362,9 +362,6 @@
|
|||
</div>
|
||||
<div class="block">
|
||||
<input id="tags" class="input" type="tags" placeholder="Add query" value="{{ tags|joinsep:',' }}">
|
||||
<script>
|
||||
setupTags();
|
||||
</script>
|
||||
</div>
|
||||
<div class="block">
|
||||
<div id="results">
|
||||
|
|
|
@ -203,7 +203,14 @@
|
|||
var inputTags = document.getElementsByClassName('tags-input');
|
||||
var inputBox = document.querySelector("[placeholder='Add query']");
|
||||
var isFocused = (document.activeElement === inputBox);
|
||||
for (index = 0; index < inputTags.length; index++) {
|
||||
if (index == 0) {
|
||||
inputTags[0].outerHTML = '<input id="tags" class="input" type="tags" placeholder="Add query" value="{{ tags|joinsep:',' }}">';
|
||||
} else {
|
||||
inputTags[index].remove();
|
||||
}
|
||||
}
|
||||
// inputTags[0].outerHTML = '<input id="tags" class="input" type="tags" placeholder="Add query" value="{{ tags|joinsep:',' }}">';
|
||||
setupTags();
|
||||
var inputBox = document.querySelector("[placeholder='Add query']");
|
||||
if (isFocused) {
|
||||
|
|
Loading…
Reference in New Issue