Closed Bug 1267804 Opened 9 years ago Closed 9 years ago

Drag & Drop a contact name from Thunderbird address book (list view) to address box in a new message “compose” window creates two instances of the address in the target address box.

Categories

(Thunderbird :: Message Compose Window, defect)

45 Branch
defect
Not set
major

Tracking

(thunderbird46 wontfix, thunderbird47 fixed, thunderbird48 fixed, thunderbird49 fixed, thunderbird_esr38 unaffected, thunderbird_esr45+ fixed)

RESOLVED FIXED
Thunderbird 49.0
Tracking Status
thunderbird46 --- wontfix
thunderbird47 --- fixed
thunderbird48 --- fixed
thunderbird49 --- fixed
thunderbird_esr38 --- unaffected
thunderbird_esr45 + fixed

People

(Reporter: rdf, Assigned: jorgk-bmo)

References

Details

(Keywords: regression, Whiteboard: [relnote-thunderbird])

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; rv:45.0) Gecko/20100101 Firefox/45.0 Build ID: 20160407164938 Steps to reproduce: Operating system: Win 10-Home Ver: 1511 Build: 10586-218 When you drag and drop a contact entry from the address book (in contact list view) to a “TO” (or other type recipient) address text box the contact first, last name are added to the email address as written in the contact properties with “<” & “>” delimiters added. Then the re-written result is dropped in the text box, but an apparent BUG causes the resulting entry to be duplicated. Actual results: For example, if properties for a contact are: First: Richard Last: Foerster E-Mail: rich909@123.com ...the actual result when dropped is: Richard FoeRichard Foerster <rich909@123.com>rster <rich909@123.com> which appears to be a second copy being inserted within the first copy of the address. Expected results: The re-written result should be: Richard Foerster <rich909@123.com> NOTE: EXPERIMENTING, I discovered that if this same contact entry from the address book contact listing is dragged and dropped to the message body text block or the subject line text box in the compose window the entry result is as expected: Richard Foerster <rich909@123.com> If you make an insertion point in the target “TO” address box before dragging an address book entry to the SUBJECT LINE, a SINGLE instance of the email address is correctly written in the target TO box as well as also being written on the subject line. Turning off the OPTION for auto-completion (un-checking the box and accepting the change) DOES NOT alter the duplication problem in the “TO” address text box . ALSO NOTE that if you open the properties view for the target contact, then select the email address and drag and drop it from there to a target TO box the address IS dropped AS ENTERED (not re-written). Possibly related to BUG 295347 ???
Blocks: 1171979
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(bwinton)
Ouch, this is a really bad one. Completely destroys the function to drag&drop addresses from the list, either from the contacts sidebar or from the address book in a separate window. Personally, I'd block in this. Kent? Thanks Alice for looking into it so quickly.
Severity: normal → major
Flags: needinfo?(rkent)
Aceman, would you know how to fix this?
Flags: needinfo?(acelists)
Component: Untriaged → Message Compose Window
Blocking is a pretty severe step, as it also stop other critical fixes from moving forward. This is a broken feature, worth a release note and urgent fix, but I am not going to block the beta/release candidate on it. Note we will not actually build 45.1 for a few days, so if there is a fix for this, and it looks relatively safe, we might still consider adding it to 45.1 But the bar for inclusion is pretty high post-release candidate.
Flags: needinfo?(rkent)
Whiteboard: [relnote-thunderbird]
The problem seems to be that the attachment area opens. That doesn't happen in TB 38. If you drop the address onto the attachment area it works, if you drop it into the "To" field, it kind of gets dropped twice, once into the to field which reacts, and the attachment area also seems to react to the drop.
I can see it, but I am not a big friend of drag and drop. We should try Magnus, considering he has done changes in the area.
OK, look here: https://dxr.mozilla.org/comm-central/source/mail/components/compose/content/MsgComposeCommands.js#4364 For all types except text/x-moz-address, the "attachment bucket" (drop area) opens. I've done some debugging, the aFlavour.contentType is dumped out as application/x-moz-file. So that's why the attachment bucket opens. And the stuff gets dropped twice. Let's hope for an easy fix.
That the attachment box opens is due to bug 924530, comment #9, caused by: https://hg.mozilla.org/comm-central/rev/32e405315e3e But even backing this out still gives me a doubled-up address.
Patch to start the investigation. Maybe others have a better idea than me. Frankly, I don't see how bug 1171979 caused this. That bug did a purely mechanical change and copied nsDragAndDrop.js from M-C to C-C.
Flags: needinfo?(bwinton)
Flags: needinfo?(acelists)
I don't know if it is worth mentioning this here, but in trying to duplicate this bug I can not in Daily, other than get the attachment pane to open.
Blocks: 1268363
See Also: → 1268474
I'm not making any progress on this. Finally I decided to back out bug 1171979 which landed this: https://hg.mozilla.org/comm-central/rev/b0fd980cf36e As Alice diagnosed in comment #1, that *fixes* the problem. I don't get it.
OK, here is the story. In bug 1171979 Magnus changed ondraggesture to ondragstart and ondragdrop to ondrop because bug 1162050 was going to remove ondraggesture and ondragdrop. That bug 1162050 has never landed. Functionally ondragstart (eDragStart) and ondraggesture (eLegacyDragGesture) are the same. Functionally ondrop (eDrop) and ondragdrop (eLegacyDragDrop) are *NOT* the same. Ondrop does a whole lot more: https://dxr.mozilla.org/mozilla-central/source/dom/events/EventStateManager.cpp#3416 So I think the way to fix this is to backout bug 1171979 for now.
Not sure whether this also caused bug 1268474.
No, bug 1268474 is caused by something else, see bug 1268474 comment #5.
(In reply to Jorg K (GMT+2) from comment #13) > So I think the way to fix this is to backout bug 1171979 for now. Found a better way, patch coming.
Once you found it, it's so obvious ;-(
Attachment #8746230 - Attachment is obsolete: true
Flags: needinfo?(mkmelin+mozilla)
Attachment #8747404 - Flags: review?(acelists)
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
Blocks: 1269043
Aceman, just for fun, without the patch, select multiple addresses in the contacts sidebar and drag them to the To field. There you can see the default drop action. All the text contained in those addresses is dropped into the field at the current cursor position. Quite hilarious ;-)
Comment on attachment 8747404 [details] [diff] [review] One line obvious fix (v1). Review of attachment 8747404 [details] [diff] [review]: ----------------------------------------------------------------- Yes, this works for me. The attachment box still opens and stays open. But dragging the card to it does nothing. Also dropping the address to the To field produces: Warning: ReferenceError: reference to undefined property this.popup.popupOpen Source File: chrome://global/content/bindings/autocomplete.xml Line: 96
Attachment #8747404 - Flags: review?(acelists) → review+
Thanks for the quick review. (In reply to :aceman from comment #19) > The attachment box still opens and stays open. But dragging the card to it > does nothing. Yes, that's bug 1268238 caused by bug 924530. In bug 924530 Neil added application/x-moz-file to the list of flavours, so in https://dxr.mozilla.org/comm-central/source/mail/components/compose/content/MsgComposeCommands.js#4504 the attachment box opens. Apparently this would be useful to attach an address as vCard file, but that doesn't work. I won't fix this now. > Also dropping the address to the To field produces: > Warning: ReferenceError: reference to undefined property this.popup.popupOpen > Source File: chrome://global/content/bindings/autocomplete.xml > Line: 96 Sigh.
Keywords: checkin-needed
Comment on attachment 8747404 [details] [diff] [review] One line obvious fix (v1). [Approval Request Comment] Regression caused by (bug #): Bug 1171979 User impact if declined: Drag of addresses to composition fields not working. VERY BAD! Testing completed (on c-c, etc.): Manual test. Risk to taking this patch (and alternatives if risky): Not risky. One missing line was added. Very local effect, well understood fix.
Attachment #8747404 - Flags: approval-comm-esr45?
Attachment #8747404 - Flags: approval-comm-beta?
Attachment #8747404 - Flags: approval-comm-aurora+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Keywords: checkin-needed
OS: Unspecified → All
Hardware: Unspecified → All
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 49.0
Attachment #8747404 - Flags: approval-comm-esr45? → approval-comm-esr45+
Attachment #8747404 - Flags: approval-comm-beta? → approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: