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

github.com/kakawait/hugo-tranquilpeak-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/search-modal.js')
-rwxr-xr-xsrc/js/search-modal.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/js/search-modal.js b/src/js/search-modal.js
index cfd1e50..808a685 100755
--- a/src/js/search-modal.js
+++ b/src/js/search-modal.js
@@ -33,8 +33,9 @@
// open modal when `s` button is pressed
$(document).keyup(function(event) {
var target = event.target || event.srcElement;
- // exit if user is focusing an input
- if (target.tagName.toUpperCase() === 'INPUT') {
+ // exit if user is focusing an input or textarea
+ var tagName = target.tagName.toUpperCase();
+ if (tagName === 'INPUT' || tagName === 'TEXTAREA') {
return;
}