Closed Bug 372956 Opened 17 years ago Closed 13 years ago

control/context/right-click on mail attachment should select attachment

Categories

(Thunderbird :: Mail Window Front End, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: waynegwoods, Assigned: waynegwoods)

References

(Blocks 1 open bug)

Details

(Whiteboard: fixed by bug 630759?)

Attachments

(1 file, 1 obsolete file)

If you context-click on an unselected mail attachment, the attachment isn't selected in the process. This means that functions that are useful for attachment handling are unavailable (or intended for another attachment, if it happens to be selected).

When context-clicking, the attachment should be selected, if it isn't already. Don't do this if it's already selected, because that may result in the deselection of other items (in the case of multiple item selection it's reasonable to bring up a context menu pertinent to all of them).
Blocks: 370792
Attached patch Patch v1 - mostly works (obsolete) — Splinter Review
I don't know if this is the correct way to go about it, but this causes the attachment to be selected when it's context-clicked. It can't be done using an onclick event, as it doesn't seem to be triggered by context-clicks, so I used oncontextmenu. Maybe there's a much better solution, but this works.

The one bug that this causes is that if you do a regular click in the box, but outside any attachments (thus causing the attachment item to be de-selected), it still thinks it's selected and the menu displays accordingly. Without this patch, the selection is properly cleared. I'm not sure why it's doing this, yet.

Just wanted to put something up, anyway.
Attached patch Patch v2 - worksSplinter Review
I shouldn't have removed the call to onShowAttachmentContextMenu() from within the popup, as it's still required for context-clicks in the attachmentList. This one works now, though it means that onShowAttachmentContextMenu() is called twice for context-clicks on attachments.
Attachment #257607 - Attachment is obsolete: true
Attachment #257611 - Flags: review?(mscott)
this works already on windows. If I right click an attachment the attachment gets selected. Could this be a toolkit bug on the Mac that we are trying to work around?
It reminds me a little of bug 368397, though in that case a right-click works, it's only a ctrl+click that doesn't select (in time).
(In reply to comment #3)
> Could this be a toolkit bug on the Mac that we are trying to
> work around?

Yes, I think so. My hack is only a work-around for Mac, though it shouldn't affect Windows. A similar issue is on bug 365183. I asked there for opinions on a better solution, but received no response.

Wayne, you need a different reviewer for patch - perhaps phil?
Assignee: mscott → w.woods
Flags: wanted-thunderbird3?
Comment on attachment 257611 [details] [diff] [review]
Patch v2 - works

mscott no longer actively reviewing, so canceling review as part of Patch Love https://wiki.mozilla.org/Thunderbird:PatchLove

Wayne, I think  attachment display and handling are changing in the TB3 redesign, so the problem might go away as part of that.
Attachment #257611 - Flags: review?(mscott)
(In reply to comment #8)
> I think  attachment display and handling are changing in the TB3
> redesign, so the problem might go away as part of that.

With hindsight, unfortunately that's wishful thinking, and countless focus/selection issues in attachment pane continue to present a big and dataloss-endangered nightmare for keyboard users. Maybe bug 533921 and its sibling Bug 503125 will raise some awareness for this issue.

Please spread the word, we actually have RULES for how focus, selection and clicking should interact, as Bryan himself points out in bug 473901, comment 15:

> https://developer.mozilla.org/en/XUL_Tutorial/Focus_and_Selection
> and this might still have relevant info:
> https://wiki.mozilla.org/XUL:Focus_Behaviour

This particular bug is "worksforme": right-clicking on attachment will /select/ it. However, I still see a variant fo this bug, namely that an attachment is not /focused/ (dotted border) on right-clicking. -> needs new followup bug, if there isn't one yet.
addendum to comment 9: I'm on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20100204 Shredder/3.0.2pre
Wayne Woods (reporter), could you report back if this bug still exists in current Earlybird TB 8 on MAC?

I suspect this has been fixed by landing of Jim's ingenious one-for-all patch of bug 630759, but I can't check on a MAC.
Whiteboard: fixed by 630759?
Ludovic, can you check this on a MAC? I'm sure this has been fixed by bug 630759, but I can't check on a MAC. Jim, does your patch fix this for MAC?

STR:
- on MAC, right-click on any attachment

Expected result:
- attachment gets focus ring (!) and is selected
Whiteboard: fixed by 630759? → fixed by 630759? [closeme]
ping?

Anyone with 1 minute to test this on MAC, so this can be closed as fixed?
Flags: wanted-thunderbird3?
This is actually fixed in TB 7, so I don't know what fixed this, marking as WFM
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Yes, works for me on Mac also. Now if only TB 5, 6 or 7 where usable on a Mac I would be happy. Every time I've tried them hitting the reply button gives a window that doesn't refresh correctly. Even once refreshed fails to update as you type. Completely unusable. Off to check that this is reported.
Thank you! Another bug off attachuxtracker's list.
Whiteboard: fixed by 630759? [closeme] → fixed by bug 630759?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: