Autocomplete completes incorrectly after editing.




13 years ago
Last year


(Reporter: loismustdieall1word, Unassigned)


Windows XP
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv: Gecko/20060909 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv: Gecko/20060909 Firefox/

The autocomplete fills in your desired text with its suggested text when the text is already in the autocomplete history and you are trying to edit it in the middle with the autocomplete suggested text hilighted.  See example.

Reproducible: Always

Steps to Reproduce:
1.  Fill in a text box  (such as the one at with something so that autocomplete will have a history to work with, say "firefox gugs"
2.  Go back to the same text box and place your cursor within the boundaries of the text eg here:  "firefox g|ugs"
3.  Now that you have clicked within the text, the autocomplete for this item will pop up, move the cursor over it, selecting it, eg selecting "firefox gugs"
4.  Edit the text, say by deleting the g and replacing it with a b to read "firefox bugs"  (the autocomplete text remains highlighted)
5. Press enter

Alternate steps 1, 2
1.  Click in a used text box, bringing up the autocomplete history.
2.  Click on any item in the history bringing that text into the text box.

Actual Results:  
Firefox replaces the edited text with the selected autocomplete text.

Expected Results:  
The item should remain unchanged because you edited it.  autocomplete should not be completing in this case.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20060909 Firefox/

Works for me. Please reopen if you can reproduce the problem with a new clean Firefox installation and a newly created profile with default settings and without extensions.
Closed: 13 years ago
Resolution: --- → INVALID
This issue has been reproduced on several different machines, one with only the default firefox bug reporting extension (Talkback).  Note that this problem is not evident when using the built-in search toolbar, only when using web site text boxes.
Resolution: INVALID → ---
Please provide better steps to reproduce as it always fails for you.
I can't replicate the problem on Google's homepage.
First create a new profile:
Before changing any setting and before installing an extension try to find a reproducible case.
I've just reread my steps and alternate step two should read :
2.  Click on any item in the history bringing that text into the text box, then click within the text.

step three should read: 
3.  Now that you have clicked within the text, the autocomplete for this item
will pop up, move the mouse over it, hilighting it, eg hilighting "firefox gugs" and leave the mouse over it.

Is there a way I can edit the steps?

I have tried with a new profile exactly as i have described and it happened there too.  I didn't change any settings before trying it.

It would help to know what exactly isn't working for you, or if any particular step is unclear.  It's clear to me, but I wrote it, so that doesn't say much.
Version: unspecified → 1.5.0.x Branch
No you can't edit the text in comment 0 in this bugzilla software if this is what you mean.
After editing the text in the input box it just goes to the right search term after hitting enter so I can't repro this.
Whiteboard: [DUPEME]
I'm afraid that I'm not sure what you mean. When you edit the text after hilighting the autocomplete suggestion, is the autocomplete window still present?  if so, is the autocomplete suggestion still hilighted?   
note that you must keep the mouse over the autocomplete suggestion and pressing directional keys will make the autocomplete suggestion window disapear.
So if I understand it well you select an item in the autocomplete list but when you hit enter you don't want to autocomplete it? That's the function of the enter key at that particular moment.
I think this is not a bug but more what one could expect. Don't highlight if you don't want the action.
Whiteboard: [DUPEME]
The bug is that the selection stays selected after you have edited the text to the point of it being now completely different.  As a result all the editing is reverted to the autocomplete suggestion when you press enter.  this is especially annoying when there is a typo in your search, using google as an example. you search for something, press back because of the typo, click on the typo, move the cursor over the auto complete suggestion of what you just searched for (by accident, cause it's right there), clear the typo, and press enter and it changes it back to the old text with the typo.  What should happen is as soon as you start typing in the middle of the text, the autocomplete box should disapear because the current text no longer matches anything in the autocomplete history.
Yes, this bug/feature gets me all the time.  It mostly occurs as mentioned above when I have mistyped a search and then go back to correct it.  I try to save time by just editing it and hitting enter, but the autocomplete takes over instead and removed my edit!  If I were to make the change, and then click on the text window where I made the change, then the autocomplete disappears and it works fine.  I agree that the autocomplete should disappear once an edit is made that no longer matches what is stored in the autocomplete database.
Duplicate of this bug: 375953
I think bug 373992 is a dupe of this one, and as I commented in that bug:

Reproduced in:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/2007051502

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a6pre) Gecko/2007060204
Duplicate of this bug: 373992
Ever confirmed: true
I'd say there's something to fix here :
If RowMatch performed correctly, there wouldn't be any match just before to submit the form, so there wouldn't be any replacement of the edit.
Duplicate of this bug: 311839
Version: 1.5.0.x Branch → Trunk
Duplicate of this bug: 425088
I suspect this bug might be related to bug 407888 (dupe?)
(In reply to comment #16)
> I suspect this bug might be related to bug 407888 (dupe?)

Yes, it is.
Since the fix has more chances to occur in bug 407888, I'll mark this one as depending of the latter one.
But this is just to try to catch duplicates.
Depends on: 407888
Any updates? I noticed there were some issues with recreating the behavior. The following has recreated the problem for me every time:

1. Do a search on Google.
2. On the results page, scroll to the bottom where the search bar is.
3. Click once to bring focus to the search box.
4. Click once more to bring up the auto-complete box.
5. Mouse over the auto-complete box. This will select an entry.
6. Move the cursor backwards and edit the search terms so that they do not fit anything in the auto-complete box.
7. Press enter

Expected behavior: When the search terms change so that no entries fit, the auto-complete box should disappear.

Actual behavior: The modified search terms are replaced with the highlighted entry from the auto-complete box.

I'm pretty sure I've seen times where two clicks weren't needed, but I've been unable to re-create that so far. Either way, this is really annoying. My search terms tend to be replaced quite frequently.
The autocomplete box does not dismiss properly unless the text is modified at the end.

This is the root problem, I think.

1. Google search for "google search"
2. On the results page, double-click on "search" in the search box, and type a letter (except "s").  The autocomplete box will disappear.
3. Go back and run the search again.
4. Now double-click on "google" in the search box, and type anything.  The autocomplete box does not disappear.

#4 is the problem.  The incorrect completion happens if the focus somehow gets onto the autocomplete box.  The problem isn't the completion itself, it's the logic that keeps the autocomplete box open.
I just noticed that bug 407888 was fixed a while ago, but I'm still seeing this one (Firefox 3.5.7 on Mac).  I think this is the more serious one, since it affects information submitted to external sites that may or may not have any way to make a correction after the fact.
Per policy at If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Closed: 13 years agoLast year
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.