diff --git a/typesense-minibar.css b/typesense-minibar.css
index df7740f..1064590 100644
--- a/typesense-minibar.css
+++ b/typesense-minibar.css
@@ -117,8 +117,8 @@ typesense-minibar form::before {
cursor: pointer;
}
-.tsmb-form--open .tsmb-icon-close {
- display: block !important;
+form:not(.tsmb-form--open) .tsmb-icon-close {
+ display: none;
}
.tsmb-form--slash:not(.tsmb-form--open):not(:focus-within)::after {
diff --git a/typesense-minibar.js b/typesense-minibar.js
index 1c7a2bd..61957ca 100644
--- a/typesense-minibar.js
+++ b/typesense-minibar.js
@@ -74,7 +74,7 @@ globalThis.tsminibar = function tsminibar (form, dataset = form.dataset) {
form.addEventListener('submit', function (e) {
e.preventDefault();
});
- form.insertAdjacentHTML('beforeend', '');
+ form.insertAdjacentHTML('beforeend', '');
form.querySelector('.tsmb-icon-close').addEventListener('click', function () {
input.value = '';
state.hits = [];