Browse Source

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

development
Godwin 8 years ago
committed by GitHub
parent
commit
3d417a309b
  1. 2
      app/assets/javascripts/main.js

2
app/assets/javascripts/main.js

@ -134,7 +134,7 @@
var htmlNode = document.documentElement; var htmlNode = document.documentElement;
document.addEventListener('keydown', function(event) { document.addEventListener('keydown', function(event) {
if (htmlNode.dataset.input != 'kb' && 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")) { !event.target.attributes.contenteditable) || event.key == "Tab")) {
htmlNode.setAttribute('data-input', 'kb'); htmlNode.setAttribute('data-input', 'kb');
} }

Loading…
Cancel
Save