Skip to content

Commit

Permalink
fix(focus-indicator): must not be displayed when it is not activeElement
Browse files Browse the repository at this point in the history
fixed #13
  • Loading branch information
sarbbottam committed Jun 10, 2016
1 parent bde6673 commit b93b51c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dropdown.js
Expand Up @@ -330,6 +330,11 @@ Dropdown.prototype.init = function() {
this.pseudoSelectContainer.querySelector('a').addEventListener('focus', function() {
this.correspondingNode.classList.add(this.css.pseudoSelectFocus);
}.bind(this));
this.pseudoSelectContainer.querySelector('a').addEventListener('blur', function() {
if(this.optionsContainer.classList.contains('hide')) {
this.correspondingNode.classList.remove(this.css.pseudoSelectFocus);
}
}.bind(this));

this.correspondingNode.addEventListener('focus', function() {
this.correspondingNode.classList.remove(this.css.pseudoSelectFocus);
Expand Down

0 comments on commit b93b51c

Please sign in to comment.