Closed Bug 348844 Opened 18 years ago Closed 3 years ago

Autocomplete leaving ">>" in address field if Send button is clicked directly without confirming the autocomplete result

Categories

(Thunderbird :: Message Compose Window, defect)

x86
All
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 632127

People

(Reporter: wegwerfadresse, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Build Identifier: Thunderbird 1.5.0.5 (20060719)

If using autocompletion, the message will contain a cluttered To:-Line under certain circumstances.


Reproducible: Always

Steps to Reproduce:
1. Have two matches for a type-ahead find in your address book (one by first name, one by last name
2. Type in a name until address line displays for example "fo >> foo bar <foo@bar.com>"
3. Click on send message (*without* hitting enter or acknowledging the suggestion in another way first)

Actual Results:  
The e-mail that has been sent contains an address line
"fo >> foo bar" <foo@bar.com>

Expected Results:  
The match should have been completely resolved and replaced, e.g. the address line should read
foo bar <foo@bar.com>

I'm not sure if this may affect spam filters at the recipient side as the message does not contain the recipient's full name in a valid form.
Do you use LDAP for your address book?

This problem was much more prevalent in the 1.0 version, but bug 261272 provided a patch in time for 1.5.  During 1.5 development (then, "1.1") there was a regression (bug 305654) which was also patched.
(In reply to comment #1)
> Do you use LDAP for your address book?
> 

No, just the "normal" local file based address book(s).

The bug seems to occur only if the entry is found by last name and the subject line ist not empty before clicking on the send message button. If the subject ist left empty, the notification popup appears and the recipient is replaced as I expected it.
(In reply to comment #2)
> The bug seems to occur only if the entry is found by last name and the
> subject line ist not empty before clicking on the send message button.
> If the subject ist left empty, the notification popup appears and the
> recipient is replaced as I expected it.

Yes, you seem to be right about that.  Good observation.
Reproduced with TB 3a1-0814, Windows 2000.

This only occurs when the focus is on the field while the autocomplete is pending -- that is, the To: field is reaching as:
  Cow >> Mike Cowperthwaite <mcow@well.com>
and the Send button is pressed.  (Ctrl+Enter / Ctrl+Shift+Enter do not force a Send at this point.)  As reporter notes, when the dialog pops up to prompt for a subject, the To: field appears to have accepted the address correctly, but in the actual sent message the name portion of the address includes the typed-in substring and the >> (all properly delimited within quotes).
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → Windows 2000
Summary: To: line gets cluttered → Autocomplete leaving ">>" in address field if prompted for Subject
Version: unspecified → Trunk
Linux too.
OS: Windows 2000 → All
Assignee: mscott → nobody
And Windows 7 64bit too, so for completeness sake that "Platform: x86 All" could be changed to "All" :)
(did I just reply to a 5,5 year old comment?...)

I created the marked duplicate (Bug 731139), so I thought I'd come and comment here. In any case I can confirm the problem is still present in Thunderbird 11.0. 

So the problem is that the "manually typed text" remains in the field, if you click the Send button while the focus is still on the autocompleted field. This can be either something like "FOO Bar <foo@bar.com>" where it should have been "Foo Bar <foo@bar.com>" (i.e. the capitalization is kept as typed, instead of overwritten by the stored Contact Name), or something like "bar >> Foo Bar <foo@bar.com>" (the 'search keyword' stays behind). If you move focus away from the field, TB fixes these issues, but it does not if you click Send right away. 

The question is simply: what triggers the 'cleanup' of the field? Whatever it is ("blur" I suppose), it doesn't occur when you hit the Send button. 

I believe an easy fix is to force the active field to blur when you Send the message (or just making it execute the blur event handler). Or if it's not linked to the blur event, adding the act of "Sending the message" to the list of events that will trigger that cleanup. 

Minor bug, minor fix? No? :)
See Also: → 749923
See Also: → 1003856
See Also: → 632127
See Also: → 1009469

Subject field has nothing to do with this bug, so this is an exact elder twin duplicate of Bug 632127.

Severity: minor → S3
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Summary: Autocomplete leaving ">>" in address field if prompted for Subject → Autocomplete leaving ">>" in address field if Send button is clicked directly without confirming the autocomplete result
You need to log in before you can comment on or make changes to this bug.