ensure we don't think we're doing autocomplete when the url changes and

the toolbar is hidden, causing it not to update at all (bug 237803)
This commit is contained in:
pinkerton%aol.net 2004-09-15 17:44:01 +00:00
parent cca82d9a17
commit 1e07029d5f

View File

@ -535,7 +535,7 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
// need to use one of its routines to update the autocomplete status or
// we could find ourselves with stale results and the popup still open. If
// it doesn't have focus, we can bypass all that and just use normal routines.
if ( [[self window] firstResponder] == [self fieldEditor] ) {
if ( [self fieldEditor] && [[self window] firstResponder] == [self fieldEditor] ) {
[self setStringUndoably:aURI fromLocation:0]; // updates autocomplete correctly
// set insertion point to the end of the url. setStringUndoably:fromLocation: