Closed Bug 1649804 Opened 4 years ago Closed 4 years ago

Drag and Drop of the contacts not working in the Address Book

Categories

(Thunderbird :: Address Book, defect)

defect

Tracking

(thunderbird_esr78 fixed)

RESOLVED FIXED
Thunderbird 80.0
Tracking Status
thunderbird_esr78 --- fixed

People

(Reporter: khushil324, Assigned: darktrojan)

Details

(Whiteboard: [TM:78.2.0])

Attachments

(1 file, 1 obsolete file)

JavaScript error: chrome://messenger/content/addressbook/abDragDrop.js, line 189: TypeError: can't access property "readOnly", srcDirectory is null

Assignee: nobody → khushil324
Attachment #9160699 - Flags: review?(mkmelin+mozilla)
Status: NEW → ASSIGNED

Please add more description of where it's broken.
Not sure what is expected to work, but there seems to be other cases causing js errors: e.g. dragging a contact from global address book to a list:
Uncaught
Exception { name: "NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS", message: "[JavaScript Error: "can't access property "dropCard", this._parent is undefined" {file: "resource:///modules/AddrBookMailingList.jsm" line: 165}]'[JavaScript Error: "can't access property "dropCard", this._parent is undefined" {file: "resource:///modules/AddrBookMailingList.jsm" line: 165}]' when calling method: [nsIAbDirectory::dropCard]", result: 2153185313, filename: "chrome://messenger/content/addressbook/abDragDrop.js", lineNumber: 315, columnNumber: 0, data: XPCWrappedNative_NoHelper, stack: "onDrop@chrome://messenger/content/addressbook/abDragDrop.js:315:19\ndrop@chrome://messenger/content/addressbook/abTrees.js:209:23\n", location: XPCWrappedNative_NoHelper }
abDragDrop.js:315

I have macOS Address Book as a read-only by default. When I try to DnD the contacts from the global address book to any address book apart from the macOS Address Book, it should work but it's not working and seeing the error: JavaScript error: chrome://messenger/content/addressbook/abDragDrop.js, line 189: TypeError: can't access property "readOnly", srcDirectory is null
DnD of the contacts from the one address book to another address book is working without this patch also(condition is both are read-write address books).
I am not seeing any errors you have mentioned.

The original problem is dragging things out of the root address book, which makes srcDirectory null because that's how the root address book is represented now. The right thing to do is to find the real directory for the card(s) being dragged and use that. I've got a heap of patches dealing with things like this at the moment, and I know how I'd solve this in a tidy way, so I might as well just do it.

I haven't seen the comment 2 problem.

Assignee: khushil324 → geoff
Comment on attachment 9160699 [details] [diff] [review]
Bug-1649804_DnD-Address-Book-not-working-0.patch

Review of attachment 9160699 [details] [diff] [review]:
-----------------------------------------------------------------

I guess this won't be needed
Attachment #9160699 - Flags: review?(mkmelin+mozilla)
Attachment #9160699 - Attachment is obsolete: true

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/a22c40ba81f1
Fix drag and drop problems in the address book r=pmorris

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 80.0

I guess we should uplift?

Flags: needinfo?(geoff)
Flags: needinfo?(geoff)
Attachment #9161514 - Flags: approval-comm-esr78?

This also affects 68 ?

That's a mistake.

Comment on attachment 9161514 [details]
Bug 1649804 - Fix drag and drop problems in the address book

[Triage Comment]
Approved for esr78

Attachment #9161514 - Flags: approval-comm-esr78? → approval-comm-esr78+

Not taking this to ESR for 78.1.1, it's too tangled up with bug 1650041.

Whiteboard: [TM:78.2.0]

Backout Thunderbird 78.1.2:
https://hg.mozilla.org/releases/comm-esr78/rev/c2e75246b71a

Approval flag set incorrectly.

Comment on attachment 9161514 [details]
Bug 1649804 - Fix drag and drop problems in the address book

[Approval Request Comment]
Resetting approval to ? since this bug is waiting for 78.2.

Attachment #9161514 - Flags: approval-comm-esr78+ → approval-comm-esr78?

Comment on attachment 9161514 [details]
Bug 1649804 - Fix drag and drop problems in the address book

[Triage Comment]
Approved for esr78

Attachment #9161514 - Flags: approval-comm-esr78? → approval-comm-esr78+

(In reply to Geoff Lankow (:darktrojan) from comment #12)

Not taking this to ESR for 78.1.1, it's too tangled up with bug 1650041.

n.b. this is also getting approval

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: