From 674bf7a47dae23500ef11f09372fb1e3fdb63aaa Mon Sep 17 00:00:00 2001 From: Cade Scroggins Date: Thu, 2 Mar 2017 23:42:10 -0800 Subject: [PATCH] ? toggles the help again --- index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 5b9fcf1..9bb78e6 100644 --- a/index.html +++ b/index.html @@ -569,6 +569,10 @@ }); } + _clearInput() { + this._inputEl.value = ''; + } + _handleKeypress(event) { const newChar = String.fromCharCode(event.which); const isEnterKey = event.which !== 13; @@ -613,7 +617,8 @@ if (event) event.preventDefault(); const query = this._inputEl.value.trim(); - if (!query) { + if (!query || query === '?') { + this._clearInput(); this._help.toggle(); } else { this._history.addItem(query);