From 71ae0ca0cda5a7f62bb50fa9ba3ec52bd600cc9d Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sun, 30 Jan 2011 11:19:44 -0500 Subject: [PATCH] Fix history search issue introduced by revision 2da9a800c618. --- common/content/commandline.js | 4 ++-- common/content/events.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/content/commandline.js b/common/content/commandline.js index 0ffd2bbe..acc0c09a 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -912,7 +912,7 @@ var CommandLine = Module("commandline", { * @param {string} val The new value. */ replace: function replace(val) { - delete this.input.dactylKeyPress; + this.input.dactylKeyPress = undefined; if (this.completions) this.completions.previewClear(); this.input.value = val; @@ -1031,7 +1031,7 @@ var CommandLine = Module("commandline", { this.caret = this.prefix.length + completion.length; this._caret = this.caret; - delete this.input.dactylKeyPress; + this.input.dactylKeyPress = undefined; }, get caret() this.editor.selection.getRangeAt(0).startOffset, diff --git a/common/content/events.js b/common/content/events.js index 168e6a59..0bf5e0fc 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -1026,7 +1026,7 @@ var Events = Module("events", { let elem = event.originalTarget; elem.dactylKeyPress = elem.value; util.timeout(function () { - if (elem.value !== elem.dactylKeyPress) + if (elem.dactylKeyPress !== undefined && elem.value !== elem.dactylKeyPress) events.dispatch(elem, events.create(elem.ownerDocument, "input")); delete events.dactylKeyPress; });