Closed Bug 1778025 Opened 2 years ago Closed 2 years ago

Drag and drop of single contact requires prior selection

Categories

(Thunderbird :: Address Book, defect, P3)

Thunderbird 102

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1732553

People

(Reporter: thomas8, Assigned: henry-x)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

+++ This bug was initially created as a clone of Bug #1777913 +++

STR

  • Ensure all contacts are deselected (e.g. by clicking another AB in directory pane and back)
  • Hover a single contact and start dragging without clicking the contact beforehand.

Actual

  • doesn't drag the contact as it's not selected

Expected

  • as in 91, single contact should probably be auto-selected when user starts a drag on the contact.
  • as a caveat, we should reflect on Ctrl+drag behaviour vs. Ctrl-(de)-selection. Maybe Henry has insights.

[contact is] not selected

This is because the selection happens on "click" rather than "mousedown". I tried to change it to "mousedown" but a change in selection rebuilds the DOM nodes, so destroys the original Event target, which means the drag event is prevented. See https://phabricator.services.mozilla.com/D149421#4892618

Selecting on "mousedown" won't be easy with the current implementation because it uses nsITreeSelection. But it should be easy after bug 1752532, but that has had to go on the back-burner for 102.

doesn't drag the contact

This is from these lines https://searchfox.org/comm-central/rev/232c80b88b0dcd6c874ff0d754215df78e4f020e/mail/components/addrbook/content/aboutAddressBook.js#2106-2108 I'll change this to use the currentIndex instead of selectedIndices when the row is not already selected.

Assignee: nobody → henry
Status: NEW → ASSIGNED

Seems that bug 1732553 covers the drag issue. The selection on mousedown will be fixed in bug 1752532.

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.