From 29ac14da1ca1ab4e89b4dd9350aacf28299d768f Mon Sep 17 00:00:00 2001 From: "gavin@gavinsharp.com" Date: Tue, 21 Aug 2007 22:00:50 -0700 Subject: [PATCH] Bug 316059: Clean up use of userTypedClear, patch by Yoni Gilad , r=mconnor --- browser/base/content/tabbrowser.xml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 3d39c1a9f88..124bb534987 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -377,7 +377,7 @@ onLocationChange : function(aWebProgress, aRequest, aLocation) { // The document loaded correctly, clear the value if we should - if (this.mBrowser.userTypedClear > 0) + if (this.mBrowser.userTypedClear > 0 && aRequest) this.mBrowser.userTypedValue = null; if (aWebProgress.DOMWindow == this.mBrowser.contentWindow && @@ -677,11 +677,7 @@ var webProgress = this.mCurrentBrowser.webProgress; var securityUI = this.mCurrentBrowser.securityUI; - // Remember the current clear state, then set it to zero - // so we don't clear the userTypedValue when just switching - // tabs. Set it back to its old state after we're done. - var userTypedClear = this.mCurrentBrowser.userTypedClear; - this.mCurrentBrowser.userTypedClear = 0; + var i, p; for (i = 0; i < this.mProgressListeners.length; i++) { p = this.mProgressListeners[i]; @@ -691,8 +687,7 @@ p.onSecurityChange(webProgress, null, securityUI.state); } } - this.mCurrentBrowser.userTypedClear = userTypedClear; - + this._fastFind.setDocShell(this.mCurrentBrowser.docShell); // Update the window title.