зеркало из https://github.com/mozilla/pjs.git
Bug 316059: Clean up use of userTypedClear, patch by Yoni Gilad <yonigilad@gmail.com>, r=mconnor
This commit is contained in:
Родитель
31a7e847fb
Коммит
9804310722
|
@ -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,7 +687,6 @@
|
|||
p.onSecurityChange(webProgress, null, securityUI.state);
|
||||
}
|
||||
}
|
||||
this.mCurrentBrowser.userTypedClear = userTypedClear;
|
||||
|
||||
this._fastFind.setDocShell(this.mCurrentBrowser.docShell);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче