Skip to content

Commit

Permalink
Flip touchable condition for better readability
Browse files Browse the repository at this point in the history
  • Loading branch information
grafluxe committed Nov 22, 2017
1 parent 028efc8 commit 927162e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Dropdownizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,17 @@ class Dropdownize {
return;
}

if (!this._touchable) {
if (this._touchable) {
this._el.classList.remove("dd-x");
this._el.focus();
this._el.classList.add("dd-x");
} else {
if (this._ui.div.classList.contains("dd-open")) {
this._closeList();
} else {
this._ui.div.classList.add("dd-open");
this._ui.div.addEventListener("mouseleave", this._onMouseLeave);
}
} else {
this._el.classList.remove("dd-x");
this._el.focus();
this._el.classList.add("dd-x");
}
}

Expand Down

0 comments on commit 927162e

Please sign in to comment.