? toggles the help again
This commit is contained in:
+6
-1
@@ -569,6 +569,10 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_clearInput() {
|
||||||
|
this._inputEl.value = '';
|
||||||
|
}
|
||||||
|
|
||||||
_handleKeypress(event) {
|
_handleKeypress(event) {
|
||||||
const newChar = String.fromCharCode(event.which);
|
const newChar = String.fromCharCode(event.which);
|
||||||
const isEnterKey = event.which !== 13;
|
const isEnterKey = event.which !== 13;
|
||||||
@@ -613,7 +617,8 @@
|
|||||||
if (event) event.preventDefault();
|
if (event) event.preventDefault();
|
||||||
const query = this._inputEl.value.trim();
|
const query = this._inputEl.value.trim();
|
||||||
|
|
||||||
if (!query) {
|
if (!query || query === '?') {
|
||||||
|
this._clearInput();
|
||||||
this._help.toggle();
|
this._help.toggle();
|
||||||
} else {
|
} else {
|
||||||
this._history.addItem(query);
|
this._history.addItem(query);
|
||||||
|
|||||||
Reference in New Issue
Block a user