aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts
diff options
context:
space:
mode:
Diffstat (limited to 'public/javascripts')
-rw-r--r--public/javascripts/main.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/public/javascripts/main.js b/public/javascripts/main.js
index 722031d..4ebc6c8 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.className = ''
autocompleteNode.innerHTML = ''
if (inputNode.value.trim() === '') return