The default bug view has changed. See this FAQ.

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

VERIFIED FIXED in Thunderbird 20.0

Status

Thunderbird
Message Compose Window
VERIFIED FIXED
5 years ago
4 years ago

People

(Reporter: nONoNonO, Assigned: Magnus Melin)

Tracking

({regression})

17 Branch
Thunderbird 20.0
regression

Thunderbird Tracking Flags

(thunderbird19 fixed, thunderbird-esr1719+ fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 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 ?
(Reporter)

Comment 2

5 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...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression, regressionwindow-wanted
(Reporter)

Comment 3

5 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:
http://hg.mozilla.org/comm-central/rev/25f87dd2453f
(Reporter)

Comment 4

5 years ago
Next change is http://hg.mozilla.org/comm-central/rev/74aaf5c6fa48 - Jim Porter — Backout changeset 25f87dd2453f due to test bustage in test-attachment.js

Comment 5

5 years ago
This WFM on a fairly recent nightly.
(Reporter)

Comment 6

5 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.
(Reporter)

Comment 7

5 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...
Keywords: regressionwindow-wanted
(Assignee)

Comment 8

4 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
(Assignee)

Comment 9

4 years ago
Created attachment 690075 [details] [diff] [review]
proposed fix

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)
(Assignee)

Comment 10

4 years ago
(And I don't think there was a bug in listbox.xml like earlier stated.)
Status: NEW → ASSIGNED
OS: Windows 7 → All
Hardware: x86 → All

Comment 11

4 years ago
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+
(Assignee)

Comment 12

4 years ago
http://hg.mozilla.org/comm-central/rev/7b9efef47391 -> FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 20.0
Would this be safe to land for versions earlier than TB20, esp esr17 for corporate environs?
status-thunderbird-esr17: --- → affected
(Assignee)

Comment 14

4 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?
(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+
https://hg.mozilla.org/releases/comm-aurora/rev/a9f7d45e4d34
status-thunderbird19: --- → fixed
tracking-thunderbird-esr17: --- → 19+
(Reporter)

Updated

4 years ago
Status: RESOLVED → VERIFIED
Attachment #690075 - Flags: approval-comm-esr17? → approval-comm-esr17+
https://hg.mozilla.org/releases/comm-esr17/rev/bb0e6b6c5db8
status-thunderbird-esr17: affected → fixed
You need to log in before you can comment on or make changes to this bug.