function isInput(element) {
  var inputs = ['INPUT', 'SELECT', 'TEXTAREA'];
  return element && (inputs.indexOf(element.nodeName) > -1 || element.contentEditable === 'true');
}
Determines if the given DOM element is an input field.
Notice: By 'input' we mean input, textarea and select nodes

@param {HTMLElement} element - DOM element
@returns {Boolean}