From 927162e008d537874a72a3e187f3af8d2c3c5e53 Mon Sep 17 00:00:00 2001 From: Leandro Silva Date: Wed, 22 Nov 2017 09:36:28 -0500 Subject: [PATCH] Flip touchable condition for better readability --- src/Dropdownizer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Dropdownizer.js b/src/Dropdownizer.js index bfa6b80..c4b3248 100644 --- a/src/Dropdownizer.js +++ b/src/Dropdownizer.js @@ -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"); } }