Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/icons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMark Otto <markd.otto@gmail.com>2021-12-03 10:47:31 +0300
committerGitHub <noreply@github.com>2021-12-03 10:47:31 +0300
commitd8c52acc3b0fbe94080aa6cce558b374f43eaec3 (patch)
tree4bb8ffd1b9a890c0cf2fc52dd1e2fec800f175c7 /docs
parentefc7db88af10a42f7e9e25f5800ebb364440ceda (diff)
Disable enter key on icon search (#1120)
Diffstat (limited to 'docs')
-rw-r--r--docs/assets/js/application.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js
index 00e068428..cd734929c 100644
--- a/docs/assets/js/application.js
+++ b/docs/assets/js/application.js
@@ -45,7 +45,16 @@
errorElement.classList.remove('d-none')
errorElement.insertAdjacentHTML('afterbegin', fallbackMsg)
- });
+ })
+
+ var searchInput = document.getElementById('search')
+ if (searchInput) {
+ searchInput.addEventListener('keydown', function (event) {
+ if (event.key === 'Enter') {
+ event.preventDefault()
+ }
+ })
+ }
// Disable empty links in docs
[].slice.call(document.querySelectorAll('[href="#"]'))