Can't remove attachment with keyboard in forwarded e-mail

VERIFIED FIXED in Thunderbird 20.0


7 years ago
6 years ago


(Reporter: nONoNonO, Assigned: mkmelin)



17 Branch
Thunderbird 20.0
Dependency tree / graph

Thunderbird Tracking Flags

(thunderbird19 fixed, thunderbird-esr1719+ fixed)



(1 attachment)



7 years ago
Sometimes I need to forward e-mails (inline), but I have to strip the attachment. So I select the message, press Ctrl+L to forward the message. Then in the Compose window I press Alt+M to go to the attachments bucket, press Space to select the attachment and press Del to delete it, but nothing happens.

I can delete the attachment by going to the menu Edit -> Remove attachment (Del).

I see the following error in the Error Console:
Timestamp: 9-10-2012 13:35:47
Error: TypeError: boundTarget is null
Source File: chrome://messenger/content/messengercompose/MsgComposeCommands.js
Line: 4175

It doesn't matter whether I'm in safe-mode or not.
Onno can you find the regression range ?

Comment 2

7 years ago
This stopped working between Thunderbird 11.0.1 and Thunderbird 12.0.1.
I'll have to dig deeper to narrow this range...
Ever confirmed: true

Comment 3

7 years ago
I've tested this with Thunderbird Daily / comm-central:
20120114030033 works
20120115030024 fails

I'm not sure how to go further from this, but from browsing hg around this date I see the following change is suspect, although there are other changes a bit later for backing out the change again:

Comment 4

7 years ago
Next change is - Jim Porter — Backout changeset 25f87dd2453f due to test bustage in test-attachment.js
This WFM on a fairly recent nightly.

Comment 6

7 years ago
Strange. I just tried with Daily 20121105030251 and it fails... I've used a fresh profile and tried both with composition in HTML as in plain text and both fail with the same error message, only with linenumber 4272.
I've tried both with Windows 7 32 bit and Windows XP and it fails on both OS-es.

Comment 7

7 years ago
The bug not only occurs when I press Alt+M, but also when I use Tab to go to the first attachment and press space to select it and then press Del. When I use Tab to go to the attachment, there is no error message in the error console.

When I select the message with Alt+M and space, press Shift+Tab to go to the Subject and press Tab again to go back to the AttachmentBucket, removing the attachment by pressing Del *does* work...

Comment 8

7 years ago
Yeah this is from bug 526998  - and 100% reproducible for me on linux.

Apparently due to a bug in listbox.xml code earlier there was an ugly workaround 

let enabled = bucketList && bucketList.getRowCount() && (bucketList == top.document.commandDispatcher.focusedElement);
Assignee: nobody → mkmelin+mozilla
Blocks: 526998

Comment 9

7 years ago
Posted patch proposed fixSplinter Review
What seems to happen is:
cmd_delete is one of the commands that is updated when focus changes (since it is used elsewhere too).
When entering the attachments area using keyboard (Alt+M) the attachmentBucket gets focus,
 -> command updating, but at that point there's no selection so cmd_delete is
disabled. When an item gets selected that doesn't cause the commands to get
updated, so cmd_deleted is always disabled.

There was also an exception for keyboard "clicks", since then the attachmentBucket is the event's original target, and that isn't anonymous, so doesn't have a bindingparent.
Attachment #690075 - Flags: review?(squibblyflabbetydoo)

Comment 10

7 years ago
(And I don't think there was a bug in listbox.xml like earlier stated.)
OS: Windows 7 → All
Hardware: x86 → All
Comment on attachment 690075 [details] [diff] [review]
proposed fix

Review of attachment 690075 [details] [diff] [review]:

I've never been able to reproduce this, even though I'm on Linux too, so I'll just trust you that this fixes it. The code *looks* sane, anyway.
Attachment #690075 - Flags: review?(squibblyflabbetydoo) → review+

Comment 12

7 years ago -> FIXED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 20.0

Comment 13

7 years ago
Would this be safe to land for versions earlier than TB20, esp esr17 for corporate environs?

Comment 14

7 years ago
Comment on attachment 690075 [details] [diff] [review]
proposed fix

Review of attachment 690075 [details] [diff] [review]:

This should be save to take on esr.

On a related note i don't know where the Alt+M shortcut to select the attachment bucket is coming from, but it seems undocumented?
Attachment #690075 - Flags: approval-comm-esr17?

Comment 15

7 years ago
(In reply to Magnus Melin from comment #14)
> On a related note i don't know where the Alt+M shortcut to select the
> attachment bucket is coming from, but it seems undocumented?

It comes from the attachment pane caption "1 attach_m_ent", which is only found in attachment pane of /composition/. So it's an *access key* (not a keyboard shortcut), and we generally do not document access keys because they are always visible in the primary UI itself. On some OS, you have to press Alt to see the access keys underlined in the UI.
Comment on attachment 690075 [details] [diff] [review]
proposed fix

[Triage Comment]
Given the age of when this was introduced, we'll let the patch soak during the 19 beta cycle and take it into 17.0.2 (or whatever it is equivalent to when gecko 19 is released).

So we'll take it onto aurora now before the merge, so it'll be ready for the next beta.
Attachment #690075 - Flags: approval-comm-aurora+


6 years ago
Attachment #690075 - Flags: approval-comm-esr17? → approval-comm-esr17+
You need to log in before you can comment on or make changes to this bug.