diff --git a/common/content/commandline.js b/common/content/commandline.js index 1af40583..2a669521 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -986,7 +986,9 @@ var CommandLine = Module("commandline", { dactyl.registerObserver("events.doneFeeding", this.closure.onDoneFeeding, true); this.autocompleteTimer = Timer(200, 500, function autocompleteTell(tabPressed) { - if (!events.feedingKeys && options["autocomplete"].length) { + if (events.feedingKeys) + this.ignoredCount++; + if (options["autocomplete"].length) { this.complete(true, false); this.itemList.visible = true; } @@ -1004,8 +1006,11 @@ var CommandLine = Module("commandline", { this.itemList.visible = false; }, + ignoredCount: 0, onDoneFeeding: function onDoneFeeding() { - this.autocompleteTimer.flush(true); + if (this.ignoredCount) + this.autocompleteTimer.flush(true); + this.ignoredCount = 0; }, UP: {}, diff --git a/common/content/events.js b/common/content/events.js index 46e8775a..c9908923 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -1105,7 +1105,7 @@ var Events = Module("events", { // Hack to deal with and so forth not dispatching input // events - if (event.originalTarget instanceof HTMLInputElement && !modes.main.passthrough) { + if (key && event.originalTarget instanceof HTMLInputElement && !modes.main.passthrough) { let elem = event.originalTarget; elem.dactylKeyPress = elem.value; util.timeout(function () {