diff --git a/assets/js/common.js b/assets/js/common.js index 022a753..dcc5058 100644 --- a/assets/js/common.js +++ b/assets/js/common.js @@ -394,6 +394,12 @@ } if (e.key === 'Escape' && isInput) { + if (active.matches && active.matches('[data-example-search], [data-change-search], input[type="search"]')) { + if (active.value) { + active.value = ''; + active.dispatchEvent(new Event('input', { bubbles: true })); + } + } active.blur(); } } catch (err) {}