From 1f7a6fb844a3ef1996bddcdcc6c4fc66fe35aecb Mon Sep 17 00:00:00 2001 From: Neil Rashbrook Date: Sat, 13 Jun 2009 00:48:41 +0100 Subject: [PATCH] Bug 494169 Tweak xpfe autocomplete to track toolkit change and pass tests from bug 494410 r=mcsmurf --- .../autocomplete/resources/content/autocomplete.xml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/xpfe/components/autocomplete/resources/content/autocomplete.xml b/xpfe/components/autocomplete/resources/content/autocomplete.xml index c27e239d7279..e122570b9bf4 100644 --- a/xpfe/components/autocomplete/resources/content/autocomplete.xml +++ b/xpfe/components/autocomplete/resources/content/autocomplete.xml @@ -781,9 +781,10 @@ this.setTextValue(val); this.mNeedToFinish = false; } else if (this.mTransientValue || - !(this.forceComplete || this.mDefaultMatchFilled) || - !(this.forceComplete || aForceComplete) || - !(this.mNeedToComplete || aForceComplete)) { + !(this.forceComplete || + (aForceComplete && + this.mDefaultMatchFilled && + this.mNeedToComplete))) { this.mNeedToFinish = false; } else if (this.isWaiting) { // if the user typed, the search results are out of date, so let @@ -926,6 +927,7 @@ return; this.userAction = "typing"; + this.mFinishAfterSearch = false; this.mNeedToFinish = true; this.mTransientValue = false; this.mNeedToComplete = true; @@ -984,7 +986,9 @@ case KeyEvent.DOM_VK_LEFT: case KeyEvent.DOM_VK_RIGHT: - this.finishAutoComplete(false, false, aEvent); + case KeyEvent.DOM_VK_HOME: + case KeyEvent.DOM_VK_END: + this.finishAutoComplete(true, false, aEvent); this.clearTimer(); this.closeResultPopup(); break;