Closed Bug 1712002 Opened 4 years ago Closed 4 years ago

dropping of addresses from Address Book into a compose window address field is handled twice

Categories

(SeaMonkey :: MailNews: Composition, defect)

defect

Tracking

(seamonkey2.53+ fixed, seamonkey2.57esr? affected)

RESOLVED FIXED
seamonkey 2.87
Tracking Status
seamonkey2.53 + fixed
seamonkey2.57esr ? affected

People

(Reporter: njsg, Assigned: njsg)

Details

(Whiteboard: SM2.53.8)

Attachments

(1 file, 2 obsolete files)

As frg observed, dragging and dropping contacts from the address book into a compose window address field does not produce the expected result - if contacts abc, def and xyz are selected, and dropped in the first empty address field, the result will be something like:

To: abcabc, def, xyz
To: def
To: xyz

This is present in 2.53.9b1pre and also in 2.49.5. This appears to be caused by the drop event being handled twice. The field where the selection is dropped gets the corresponding address (in this case abc), and the whole selection as a comma-separated list. If "abc" is long enough, and depending on the drop location inside the field, the comma-separated list may appear in the middle of "abc". Using "undo" in the affected field then shows "abc".

This was bug 1267804 for Thunderbird, and adding event.preventDefault() before "if (onWidget)" inside DropOnAddressingTarget() (see bug 1708999) seems to help.

Attached patch 1712002-preventDefault (obsolete) — Splinter Review

Is something like this sufficient? Should it also call stopPropagation() somewhere?

Assignee: nobody → nunojsg
Status: NEW → ASSIGNED
Attachment #9222762 - Flags: feedback?(iann_bugzilla)
Attachment #9222762 - Flags: feedback?(iann_bugzilla) → feedback+

Something like this for the stopPropagation?

Attachment #9222762 - Attachment is obsolete: true
Attachment #9222821 - Flags: review?(frgrahl)
Attachment #9222821 - Flags: feedback?(nunojsg)
Attachment #9222821 - Flags: approval-comm-release?
Attachment #9222821 - Flags: approval-comm-esr60?

A newer version from the patch queue with the modifications discussed here and on IRC.

Attachment #9222821 - Attachment is obsolete: true
Attachment #9222821 - Flags: review?(frgrahl)
Attachment #9222821 - Flags: feedback?(nunojsg)
Attachment #9222821 - Flags: approval-comm-release?
Attachment #9222821 - Flags: approval-comm-esr60?

Comment on attachment 9223133 [details] [diff] [review]
1712002-preventDefault-v1_2-2538.patch

[Triage Comment]
Carrying forward r/a=frg

Attachment #9223133 - Flags: review+
Attachment #9223133 - Flags: approval-comm-release+
Attachment #9223133 - Flags: approval-comm-esr60+

Pushed by frgrahl@gmx.net:
https://hg.mozilla.org/comm-central/rev/4b505f0c9199
Prevent repeated handling of drop event. r=frg

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Whiteboard: SM2.53.8
Target Milestone: --- → seamonkey 2.87
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: