title: Disable hover when key pressed
body: <p>I implement a custom dropdown, and I have a problem when I move by keyboard: hover works too and I don't know how to disable it. I've paste my code here <a href="http://jsfiddle.net/4o0bcv1d/" rel="nofollow">http://jsfiddle.net/4o0bcv1d/</a>, but here my code works correct. When I copy code to index.html - hover works again, when I move by keyboard.
  How I can fix it?</p>
  
  <pre><code>var doc = document;
  var keydown_count = -1;
  
  var dropdown_content = doc.querySelector('.dropdown-content');
  var dropdown_items = doc.querySelectorAll('.dropdown-item');
  var dropdown_items_length = dropdown_items.length;
  
  var clear_navigation_hover = function () {
      for (var i = 0; i &lt; dropdown_items_length; ++i) {
          dropdown_items[i].classList.remove('dropdown-item--hover');
      };
  }
  
  var navigation_hover_by_keydown = function (event) {
      var event = event || event.window;
      var UP = 38;
      var DOWN = 40;
      var SCROLL_STEP = 66;
  
      if (event.keyCode === UP) {
          keydown_count--;
  
          if (keydown_count &lt; 0) {
              keydown_count = dropdown_items_length - 1;
              dropdown_content.scrollTop = 66 * dropdown_items_length;
          }
  
          if (keydown_count &lt; (dropdown_items_length - 3)) {
              dropdown_content.scrollTop -= 66;
          };
  
      } else if (event.keyCode === DOWN) {
          keydown_count++;
  
          if (keydown_count &gt;= dropdown_items_length) {
              keydown_count = 0;
              dropdown_content.scrollTop = 0;
          }
  
          if (keydown_count &gt; 3) {
              dropdown_content.scrollTop += 66;
          };
  
      }
      clear_navigation_hover();
      dropdown_items[keydown_count].classList.add('dropdown-item--hover');
  }
  
  var dropdown_input = doc.querySelector('.dropdown-input');
  dropdown_input.addEventListener('keydown', navigation_hover_by_keydown, false);
  
  var navigation_hover_by_hover = function () {
      clear_navigation_hover();
      this.classList.add('dropdown-item--hover');
      keydown_count = this.getAttribute('data-index');
      console.log('hover');
  }
  
  for (var i = 0; i &lt; dropdown_items_length; ++i) {
      dropdown_items[i].addEventListener('mouseover', navigation_hover_by_hover, false);
  }
  </code></pre>