Browse Source

clean code

Yuki Takei 8 years ago
parent
commit
f5c257d0df
1 changed files with 1 additions and 1 deletions
  1. 1 1
      resource/js/legacy/crowi.js

+ 1 - 1
resource/js/legacy/crowi.js

@@ -987,7 +987,7 @@ window.addEventListener('keydown', (event) => {
 
   // ignore when target dom is input
   const inputPattern = /^input|textinput|textarea$/i;
-  if (target.tagName.match(inputPattern) || target.isContentEditable) {
+  if (inputPattern.test(target.tagName) || target.isContentEditable) {
     return;
   }