Fixed bug in IE where array does not define 'includes'

This commit is contained in:
Godwin 2016-09-07 08:19:44 -07:00 committed by GitHub
parent 1e3011a488
commit 3d417a309b

View File

@ -134,7 +134,7 @@
var htmlNode = document.documentElement;
document.addEventListener('keydown', function(event) {
if (htmlNode.dataset.input != 'kb' &&
((!["input", "textarea", "select", "option"].includes(event.target.nodeName.toLowerCase()) &&
((["input", "textarea", "select", "option"].indexOf(event.target.nodeName.toLowerCase()) < 0 &&
!event.target.attributes.contenteditable) || event.key == "Tab")) {
htmlNode.setAttribute('data-input', 'kb');
}