diff options
Diffstat (limited to 'public/javascripts')
-rw-r--r-- | public/javascripts/main.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/public/javascripts/main.js b/public/javascripts/main.js index 97f6bcc..7daedcf 100644 --- a/public/javascripts/main.js +++ b/public/javascripts/main.js @@ -88,7 +88,15 @@ searchNode.addEventListener('keydown', function (e) { } }) -searchNode.addEventListener('input', function (e) { +let inputEventStr +if (navigator.userAgent.indexOf('MSIE') !== -1 || + navigator.appVersion.indexOf('Trident/') > 0) { + inputEventStr = 'textinput' // IE 6-11 +} else { + inputEventStr = 'input' // normal browsers +} + +searchNode.addEventListener(inputEventStr, function (e) { document.body.classList.remove('no-input') autocompleteNode.innerHTML = '' if (inputNode.value.trim() === '') return |